Rob Shearman : comdlg32: Fix potential buffer overrun of lpxx-> lfFaceName in CFn_WMCommand.
Alexandre Julliard
julliard at winehq.org
Tue Feb 19 08:05:15 CST 2008
Module: wine
Branch: master
Commit: ff527875d9a834b7f77d7cd7d97ec8039e7deede
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ff527875d9a834b7f77d7cd7d97ec8039e7deede
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Feb 18 19:39:04 2008 +0000
comdlg32: Fix potential buffer overrun of lpxx->lfFaceName in CFn_WMCommand.
---
dlls/comdlg32/fontdlg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c
index f25d17d..deefe8f 100644
--- a/dlls/comdlg32/fontdlg.c
+++ b/dlls/comdlg32/fontdlg.c
@@ -963,7 +963,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
call back with the extra FONTTYPE_... bits added */
lpxx->lfPitchAndFamily = HIWORD(l) >> 8;
}
- lstrcpyW(lpxx->lfFaceName,str);
+ lstrcpynW(lpxx->lfFaceName, str, sizeof(lpxx->lfFaceName)/sizeof(lpxx->lfFaceName[0]));
i=SendDlgItemMessageW(hDlg, cmb2, CB_GETCURSEL, 0, 0);
if (i!=CB_ERR)
{
More information about the wine-cvs
mailing list