[Libreoffice-commits] core.git: 2 commits - codemaker/source writerfilter/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 7 06:30:23 PDT 2014
codemaker/source/cppumaker/cppuoptions.cxx | 2 +-
codemaker/source/javamaker/javaoptions.cxx | 2 +-
writerfilter/source/dmapper/FontTable.cxx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ee3b34878a37dd83f5c924de6752a8d804958a41
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 7 14:24:36 2014 +0100
coverity#735573 Logically dead code
Change-Id: I4635e974b7812ed5fbc95bd65b7108bb99235661
diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx
index 59cd5d0..6510997 100644
--- a/writerfilter/source/dmapper/FontTable.cxx
+++ b/writerfilter/source/dmapper/FontTable.cxx
@@ -131,7 +131,7 @@ void FontTable::lcl_sprm(Sprm& rSprm)
nSprmId == NS_ooxml::LN_CT_Font_embedRegular ? ""
: nSprmId == NS_ooxml::LN_CT_Font_embedBold ? "b"
: nSprmId == NS_ooxml::LN_CT_Font_embedItalic ? "i"
- : nSprmId == NS_ooxml::LN_CT_Font_embedBoldItalic ? "bi" : "?" );
+ : /*NS_ooxml::LN_CT_Font_embedBoldItalic*/ "bi" );
pProperties->resolve( handler );
}
break;
commit 3d9d0b78a709065b49651e1635b8f6fe5daa2d17
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 6 17:29:29 2014 +0100
coverity#1242375 Don't call fscanf without specifiers
Change-Id: I58082770ca79da9c4d235b5ea0dc79c688c7498b
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index 3436a17..3414a53 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -276,7 +276,7 @@ bool CppuOptions::initOptions(int ac, char* av[], bool bCmdFile)
char* rargv[512];
char buffer[512];
- while ( fscanf(cmdFile, "%s", buffer) != EOF )
+ while (fscanf(cmdFile, "%511s", buffer) != EOF && rargc < 512)
{
rargv[rargc]= strdup(buffer);
rargc++;
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index e1f2524..75e2bd6 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -200,7 +200,7 @@ bool JavaOptions::initOptions(int ac, char* av[], bool bCmdFile)
char* rargv[512];
char buffer[512];
- while ( fscanf(cmdFile, "%s", buffer) != EOF )
+ while (fscanf(cmdFile, "%511s", buffer) != EOF && rargc < 512)
{
rargv[rargc]= strdup(buffer);
rargc++;
More information about the Libreoffice-commits
mailing list