summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-07-05 22:26:39 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-05 22:41:11 +0200
commitd1e6ecb3538e06cd4691e4296597748b9394410d (patch)
treedf2b2d19a05825be89052bca6d645e885878c07a /extensions
parentcoverity#983491 String Overflow (diff)
downloadcore-d1e6ecb3538e06cd4691e4296597748b9394410d.tar.gz
core-d1e6ecb3538e06cd4691e4296597748b9394410d.zip
coverity#983489 String Overflow
Change-Id: I146844d10dc6ee147031a8ffa6fabe9e271b2bd0
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/nsplugin/source/npshell.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index 242c39d022b3..cae8fbe2e7a9 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -708,8 +708,10 @@ NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
char* pfilename = NULL;
if (NULL != (pfilename = strrchr(url, '/')))
{
- strcpy(filename, pfilename+1);
- } else {
+ strncat(filename, pfilename+1, 1024);
+ }
+ else
+ {
return;
}