comdlg32: Fix potential buffer overrun of lpxx->lfFaceName in CFn_WMCommand.

This commit is contained in:
Rob Shearman 2008-02-18 19:39:04 +00:00 committed by Alexandre Julliard
parent e1affcc55e
commit ff527875d9
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{