diff options
author | nyamatongwe <devnull@localhost> | 2012-07-18 11:15:22 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-07-18 11:15:22 +1000 |
commit | 6725433c27f289933649660f6b506b596bcfb7a2 (patch) | |
tree | e54110e08cade46e8b4558c536fca807c681ccad /src | |
parent | 4a17ff24ea602ff3965fcf44534cba67d1d06db2 (diff) | |
download | scintilla-mirror-6725433c27f289933649660f6b506b596bcfb7a2.tar.gz |
strncat was being used with incorrect length argument. Result is always
safely limited so use strcat instead.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 3fabf1ab7..44226d11b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5889,11 +5889,11 @@ void Editor::CopySelectionRange(SelectionText *ss, bool allowLineCopy) { char *textWithEndl = new char[textLen]; textWithEndl[0] = '\0'; if (text) - strncat(textWithEndl, text, textLen); + strcat(textWithEndl, text); if (pdoc->eolMode != SC_EOL_LF) - strncat(textWithEndl, "\r", textLen); + strcat(textWithEndl, "\r"); if (pdoc->eolMode != SC_EOL_CR) - strncat(textWithEndl, "\n", textLen); + strcat(textWithEndl, "\n"); ss->Set(textWithEndl, static_cast<int>(strlen(textWithEndl) + 1), pdoc->dbcsCodePage, vs.styles[STYLE_DEFAULT].characterSet, false, true); delete []text; |