diff options
author | nyamatongwe <unknown> | 2012-07-18 11:15:22 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-07-18 11:15:22 +1000 |
commit | 1f14ba44fa94017d8fe5fe311fc7997e29534e2c (patch) | |
tree | d15395f64e59c8b58828d8a6989c137a59d7ab7c /src | |
parent | 974bf5b2478842e03d66e8cbb5dbccbf32dcda7b (diff) | |
download | scintilla-mirror-1f14ba44fa94017d8fe5fe311fc7997e29534e2c.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; |