[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/qa filter/source

Caolán McNamara caolanm at redhat.com
Thu Jul 16 02:12:00 PDT 2015


 filter/qa/cppunit/data/pbm/fail/hang-1.pbm          |binary
 filter/qa/cppunit/data/pbm/indeterminate/.gitignore |    1 +
 filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm    |binary
 filter/qa/cppunit/filters-ppm-test.cxx              |    4 ++++
 filter/source/graphicfilter/ipbm/ipbm.cxx           |    2 +-
 5 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c48004eb562a9c4b377cf31a09a04cb03abdc58e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jul 15 14:01:46 2015 +0100

    avoid hang in short pbm
    
    Change-Id: I9b7f0832a4dc231e1e8f963858c155e3cd392667
    (cherry picked from commit b8637e67d6d39e47d22cfce496000288f0dc58d8)
    Reviewed-on: https://gerrit.libreoffice.org/17083
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/filter/qa/cppunit/data/pbm/fail/.gitignore b/filter/qa/cppunit/data/pbm/fail/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/filter/qa/cppunit/data/pbm/fail/hang-1.pbm b/filter/qa/cppunit/data/pbm/fail/hang-1.pbm
new file mode 100644
index 0000000..21742d2
Binary files /dev/null and b/filter/qa/cppunit/data/pbm/fail/hang-1.pbm differ
diff --git a/filter/qa/cppunit/data/pbm/indeterminate/.gitignore b/filter/qa/cppunit/data/pbm/indeterminate/.gitignore
new file mode 100644
index 0000000..e9c5b17
--- /dev/null
+++ b/filter/qa/cppunit/data/pbm/indeterminate/.gitignore
@@ -0,0 +1 @@
+*.ppm-*
diff --git a/filter/qa/cppunit/data/pbm/pass/.gitignore b/filter/qa/cppunit/data/pbm/pass/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm b/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm
new file mode 100644
index 0000000..d6e3fc6
Binary files /dev/null and b/filter/qa/cppunit/data/pbm/pass/rhbz160429-1.pbm differ
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
index e98ce6f..10f2658 100644
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ b/filter/qa/cppunit/filters-ppm-test.cxx
@@ -62,6 +62,10 @@ void PpmFilterTest::testCVEs()
     testDir(OUString(),
         getURLFromSrc("/filter/qa/cppunit/data/ppm/"),
         OUString());
+
+    testDir(OUString(),
+        getURLFromSrc("/filter/qa/cppunit/data/pbm/"),
+        OUString());
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(PpmFilterTest);
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 248d4df..e545334 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -179,7 +179,7 @@ bool PBMReader::ImplReadHeader()
     }
     while ( !bFinished )
     {
-        if ( mrPBM.GetError() )
+        if (!mrPBM.good())
             return false;
 
         mrPBM.ReadUChar( nDat );


More information about the Libreoffice-commits mailing list