diff options
author | Neil <nyamatongwe@gmail.com> | 2013-12-22 18:00:45 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-12-22 18:00:45 +1100 |
commit | dac5800933977672e8d2d67854a97a517abbe47d (patch) | |
tree | c057a54cf4b5f01be58cc5042ee30043a2363ba6 /win32/ScintillaWin.cxx | |
parent | 3f4549e26cb8182fa236ea3c8a08c20a71e4da38 (diff) | |
download | scintilla-mirror-dac5800933977672e8d2d67854a97a517abbe47d.tar.gz |
Avoid unsafe strcpy, strncpy, and strcat replacing with safer functions which
guaranty termination where possible.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 2a6ac369d..8d5af5815 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -45,6 +45,7 @@ #include "SciLexer.h" #include "LexerModule.h" #endif +#include "StringCopy.h" #include "SplitVector.h" #include "Partitioning.h" #include "RunStyles.h" @@ -2149,8 +2150,8 @@ void ScintillaWin::ImeStartComposition() { lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0); lf.lfCharSet = DEFAULT_CHARSET; lf.lfFaceName[0] = '\0'; - if (vs.styles[styleHere].fontName && (strlen(vs.styles[styleHere].fontName) < sizeof(lf.lfFaceName))) - strcpy(lf.lfFaceName, vs.styles[styleHere].fontName); + if (vs.styles[styleHere].fontName) + StringCopy(lf.lfFaceName, vs.styles[styleHere].fontName); ::ImmSetCompositionFontA(hIMC, &lf); } |