projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db0a8fd
)
[CONSOLE]
author
Pierre Schweitzer
<pierre@reactos.org>
Sat, 24 Oct 2015 07:59:52 +0000
(07:59 +0000)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sat, 24 Oct 2015 07:59:52 +0000
(07:59 +0000)
Don't overrun two buffers
CID
1322100
,
1237057
svn path=/trunk/; revision=69660
reactos/dll/cpl/console/font.c
patch
|
blob
|
history
diff --git
a/reactos/dll/cpl/console/font.c
b/reactos/dll/cpl/console/font.c
index
79c582a
..
86683f5
100644
(file)
--- a/
reactos/dll/cpl/console/font.c
+++ b/
reactos/dll/cpl/console/font.c
@@
-305,7
+305,7
@@
FontTypeChange(HWND hwndDlg,
LB_GETTEXT, nSel, (LPARAM)FaceName);
FaceName[Length] = '\0';
- Length = min(Length/*wcslen(FaceName) + 1*/, LF_FACESIZE); // wcsnlen
+ Length = min(Length/*wcslen(FaceName) + 1*/, LF_FACESIZE
- 1
); // wcsnlen
wcsncpy(pConInfo->FaceName, FaceName, LF_FACESIZE);
pConInfo->FaceName[Length] = L'\0';
DPRINT1("pConInfo->FaceName = '%S'\n", pConInfo->FaceName);