aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/PropSetSimple.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
commitdac5800933977672e8d2d67854a97a517abbe47d (patch)
treec057a54cf4b5f01be58cc5042ee30043a2363ba6 /lexlib/PropSetSimple.cxx
parent3f4549e26cb8182fa236ea3c8a08c20a71e4da38 (diff)
downloadscintilla-mirror-dac5800933977672e8d2d67854a97a517abbe47d.tar.gz
Avoid unsafe strcpy, strncpy, and strcat replacing with safer functions which
guaranty termination where possible.
Diffstat (limited to 'lexlib/PropSetSimple.cxx')
-rw-r--r--lexlib/PropSetSimple.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexlib/PropSetSimple.cxx b/lexlib/PropSetSimple.cxx
index 6792eea15..6f4553a07 100644
--- a/lexlib/PropSetSimple.cxx
+++ b/lexlib/PropSetSimple.cxx
@@ -146,7 +146,7 @@ int PropSetSimple::GetExpanded(const char *key, char *result) const {
ExpandAllInPlace(*this, val, 100, VarChain(key));
const int n = static_cast<int>(val.size());
if (result) {
- strcpy(result, val.c_str());
+ memcpy(result, val.c_str(), n+1);
}
return n; // Not including NUL
}