[Libreoffice-commits] core.git: writerperfect/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 20 17:50:28 UTC 2018


 writerperfect/qa/unit/EPUBExportTest.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 993d92d5cbb8f63a630ca615112a6abbefdf8a16
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 17:02:50 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 19:50:08 2018 +0200

    pvs-studio: Possible overflow
    
    Change-Id: Ifa213fd6b719683afae9633615f69db894cd9c18
    Reviewed-on: https://gerrit.libreoffice.org/62062
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx
index ecca84410866..be8302dc520e 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -284,7 +284,7 @@ void EPUBExportTest::testMimetype()
     SvMemoryStream aMemoryStream;
     aMemoryStream.WriteStream(aFileStream);
     OString aExpected("application/epub+zip");
-    CPPUNIT_ASSERT(aMemoryStream.GetSize() > static_cast<sal_uInt64>(38 + aExpected.getLength()));
+    CPPUNIT_ASSERT(aMemoryStream.GetSize() > static_cast<sal_uInt64>(aExpected.getLength()) + 38);
 
     OString aActual(static_cast<const char*>(aMemoryStream.GetData()) + 38, aExpected.getLength());
     // This failed: actual data was some garbage, not the uncompressed mime type.


More information about the Libreoffice-commits mailing list