Alexandre Julliard : winhlp32: Don't use strncpy.
Alexandre Julliard
julliard at winehq.org
Mon Jan 23 13:01:10 CST 2012
Module: wine
Branch: master
Commit: c0f65cc99bb84d0ac056d8a89e2458f3f617b4d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0f65cc99bb84d0ac056d8a89e2458f3f617b4d4
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jan 23 12:13:03 2012 +0100
winhlp32: Don't use strncpy.
---
programs/winhlp32/winhelp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c
index c378649..b905807 100644
--- a/programs/winhlp32/winhelp.c
+++ b/programs/winhlp32/winhelp.c
@@ -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));
}
}
More information about the wine-cvs
mailing list