summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-07-03 11:33:26 +0200
committerDavid Tardon <dtardon@redhat.com>2012-07-03 17:47:20 +0200
commit0b379def831a0caf3641f0a4e125dd697c00c8e9 (patch)
tree8768969788d26e8908cac32c4b2f500a202fa73a /extensions
parentcoverity: protect against buffer overflow (diff)
downloadcore-0b379def831a0caf3641f0a4e125dd697c00c8e9.tar.gz
core-0b379def831a0caf3641f0a4e125dd697c00c8e9.zip
coverity: protect against buffer overflow
Change-Id: I467e328ddb4786996ea81cdce2b76498fe8f1c61
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/nsplugin/source/so_env.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/source/nsplugin/source/so_env.cxx b/extensions/source/nsplugin/source/so_env.cxx
index a04b873b363a..9dac2488fcb6 100644
--- a/extensions/source/nsplugin/source/so_env.cxx
+++ b/extensions/source/nsplugin/source/so_env.cxx
@@ -256,7 +256,7 @@ int findReadSversion(void** aResult, int /*bWnt*/, const char* /*tag*/, const ch
/* .. now in $HOME */
#endif // LINUX
- sprintf(lnkFileName, "%s/.mozilla/plugins/libnpsoplugin%s", getenv("HOME"), SAL_DLLEXTENSION);
+ snprintf(lnkFileName, NPP_PATH_MAX - 1, "%s/.mozilla/plugins/libnpsoplugin%s", getenv("HOME"), SAL_DLLEXTENSION);
#ifdef LINUX
ssize_t len = readlink(lnkFileName, realFileName, NPP_PATH_MAX-1);
if (-1 == len)