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 | ca1a5ea845c283a9c84fd2ae9f6d152cca354183 (patch) | |
tree | d851b7c06cc7763849d504b58797199c9032b441 /win32/ScintillaWin.cxx | |
parent | 0b56a6704d1c64644d5bfef318806f8490d649ec (diff) | |
download | scintilla-mirror-ca1a5ea845c283a9c84fd2ae9f6d152cca354183.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); } |