summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-02-24 13:44:17 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-02-24 13:44:17 +0100
commitbd502f4d99a6f1e783d7eaf53e0a4d05f04629c1 (patch)
treee613a7cba4582765e5efb4e7cd45947e001601e8
parent80f57172833ec720a2bc0d7d9c8f82f8bc5fc70d (diff)
coverity#735295+735296 Buffer not null terminated
Change-Id: I02693a2f4b2470ad33e6bd7a925aa64e31ad9a58
-rw-r--r--cui/source/options/optinet2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 4b2db828a235..08def3192ade 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -1043,7 +1043,7 @@ sal_Bool MozPluginTabPage::isInstalled()
if (!getDllURL(&tempString)) {
return false;
}
- strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+ strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX - 1);
strcat(realFilePath, "/libnpsoplugin" SAL_DLLEXTENSION);
if (0 != strcmp(lnkReferFilePath, realFilePath))
@@ -1094,7 +1094,7 @@ sal_Bool MozPluginTabPage::installPlugin()
if (!getDllURL(&tempString)) {
return false;
}
- strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX);
+ strncpy(realFilePath, tempString.getStr(), NPP_PATH_MAX - 1);
strcat(realFilePath, "/libnpsoplugin" SAL_DLLEXTENSION);
// create the link