aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ScintillaBase.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-12-22 18:00:45 +1100
committerNeil <nyamatongwe@gmail.com>2013-12-22 18:00:45 +1100
commitca1a5ea845c283a9c84fd2ae9f6d152cca354183 (patch)
treed851b7c06cc7763849d504b58797199c9032b441 /src/ScintillaBase.cxx
parent0b56a6704d1c64644d5bfef318806f8490d649ec (diff)
downloadscintilla-mirror-ca1a5ea845c283a9c84fd2ae9f6d152cca354183.tar.gz
Avoid unsafe strcpy, strncpy, and strcat replacing with safer functions which
guaranty termination where possible.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r--src/ScintillaBase.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index f8b989bd4..ad45a5ad2 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -381,7 +381,7 @@ int ScintillaBase::AutoCompleteGetCurrentText(char *buffer) const {
if (item != -1) {
const std::string selected = ac.GetValue(item);
if (buffer != NULL)
- strcpy(buffer, selected.c_str());
+ memcpy(buffer, selected.c_str(), selected.length()+1);
return static_cast<int>(selected.length());
}
}