mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
[CHARMAP]
Fix buffer overruns. Dedicated to Thomas :-). CID #515199 CID #512920 svn path=/trunk/; revision=62674
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user