diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-05 22:26:39 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-07-05 22:41:11 +0200 |
commit | d1e6ecb3538e06cd4691e4296597748b9394410d (patch) | |
tree | df2b2d19a05825be89052bca6d645e885878c07a /extensions | |
parent | 54bf6b1205b0f0e02554ceb4cff3b50f67cc8eee (diff) |
coverity#983489 String Overflow
Change-Id: I146844d10dc6ee147031a8ffa6fabe9e271b2bd0
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/nsplugin/source/npshell.cxx | 6 |
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; } |