From ca1a5ea845c283a9c84fd2ae9f6d152cca354183 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Dec 2013 18:00:45 +1100 Subject: Avoid unsafe strcpy, strncpy, and strcat replacing with safer functions which guaranty termination where possible. --- src/ScintillaBase.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ScintillaBase.cxx') 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(selected.length()); } } -- cgit v1.2.3