mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[CHARMAP]
Fix buffer overruns. Dedicated to Thomas :-). CID #515199 CID #512920 svn path=/trunk/; revision=62674
This commit is contained in:
parent
cd5a6ed95e
commit
b2ec16885c
2 changed files with 6 additions and 4 deletions
|
@ -48,8 +48,9 @@ SetLrgFont(PMAP infoPtr)
|
|||
hdc);
|
||||
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
wcscpy(lf.lfFaceName,
|
||||
lpFontName);
|
||||
wcscpy_s(lf.lfFaceName,
|
||||
sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]),
|
||||
lpFontName);
|
||||
|
||||
hFont = CreateFontIndirectW(&lf);
|
||||
|
||||
|
|
|
@ -228,8 +228,9 @@ SetFont(PMAP infoPtr,
|
|||
ReleaseDC(infoPtr->hMapWnd, hdc);
|
||||
|
||||
infoPtr->CurrentFont.lfCharSet = DEFAULT_CHARSET;
|
||||
wcscpy(infoPtr->CurrentFont.lfFaceName,
|
||||
lpFontName);
|
||||
wcscpy_s(infoPtr->CurrentFont.lfFaceName,
|
||||
sizeof(infoPtr->CurrentFont.lfFaceName) / sizeof(infoPtr->CurrentFont.lfFaceName[0]),
|
||||
lpFontName);
|
||||
|
||||
infoPtr->hFont = CreateFontIndirectW(&infoPtr->CurrentFont);
|
||||
|
||||
|
|
Loading…
Reference in a new issue