Author: pschweitzer
Date: Sun Apr 6 20:20:39 2014
New Revision: 62675
URL:
http://svn.reactos.org/svn/reactos?rev=62675&view=rev
Log:
[CHARMAP]
Use rather wcsncpy(). A bit less safe, but at least, data are copied till possible
Modified:
trunk/reactos/base/applications/charmap/lrgcell.c
trunk/reactos/base/applications/charmap/map.c
Modified: trunk/reactos/base/applications/charmap/lrgcell.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/lrgcell.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/lrgcell.c [iso-8859-1] Sun Apr 6 20:20:39
2014
@@ -48,9 +48,9 @@
hdc);
lf.lfCharSet = DEFAULT_CHARSET;
- wcscpy_s(lf.lfFaceName,
- sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]),
- lpFontName);
+ wcsncpy(lf.lfFaceName,
+ lpFontName,
+ sizeof(lf.lfFaceName) / sizeof(lf.lfFaceName[0]));
hFont = CreateFontIndirectW(&lf);
Modified: trunk/reactos/base/applications/charmap/map.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/…
==============================================================================
--- trunk/reactos/base/applications/charmap/map.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/charmap/map.c [iso-8859-1] Sun Apr 6 20:20:39 2014
@@ -228,9 +228,9 @@
ReleaseDC(infoPtr->hMapWnd, hdc);
infoPtr->CurrentFont.lfCharSet = DEFAULT_CHARSET;
- wcscpy_s(infoPtr->CurrentFont.lfFaceName,
- sizeof(infoPtr->CurrentFont.lfFaceName) /
sizeof(infoPtr->CurrentFont.lfFaceName[0]),
- lpFontName);
+ wcsncpy(infoPtr->CurrentFont.lfFaceName,
+ lpFontName,
+ sizeof(infoPtr->CurrentFont.lfFaceName) /
sizeof(infoPtr->CurrentFont.lfFaceName[0]));
infoPtr->hFont = CreateFontIndirectW(&infoPtr->CurrentFont);