From d1e6ecb3538e06cd4691e4296597748b9394410d Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sat, 5 Jul 2014 22:26:39 +0200 Subject: coverity#983489 String Overflow Change-Id: I146844d10dc6ee147031a8ffa6fabe9e271b2bd0 --- extensions/source/nsplugin/source/npshell.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'extensions') 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; } -- cgit