Commit c0f65cc9 authored by Alexandre Julliard's avatar Alexandre Julliard

winhlp32: Don't use strncpy.

parent 584bdb18
......@@ -1182,8 +1182,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara
if (len > sizeof(buffer)) len = sizeof(buffer);
memcpy(buffer, ptr1, len);
if (len < sizeof(buffer)) buffer[len++] = ':';
strncpy(&buffer[len], Globals.history.set[i].page->lpszTitle, sizeof(buffer) - len);
buffer[sizeof(buffer) - 1] = '\0';
lstrcpynA(&buffer[len], Globals.history.set[i].page->lpszTitle, sizeof(buffer) - len);
TextOutA(hDc, 0, i * tm.tmHeight, buffer, strlen(buffer));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment