diff options
author | David Tardon <dtardon@redhat.com> | 2012-07-03 11:33:26 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-07-03 17:47:20 +0200 |
commit | 0b379def831a0caf3641f0a4e125dd697c00c8e9 (patch) | |
tree | 8768969788d26e8908cac32c4b2f500a202fa73a /extensions | |
parent | 38b39d3f86ac5b3afae7de3b3246544ee7412973 (diff) |
coverity: protect against buffer overflow
Change-Id: I467e328ddb4786996ea81cdce2b76498fe8f1c61
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/nsplugin/source/so_env.cxx | 2 |
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) |