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

Caolán McNamara caolanm at redhat.com
Thu Jul 16 02:15:41 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 1cf6e5d1afa7f89d7cfc595ba3dacb9633abde87
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/17085
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-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 9b281ab..e8bef14 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 63a8b09..720bc9f 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -195,7 +195,7 @@ bool PBMReader::ImplReadHeader()
     }
     while ( bFinished == false )
     {
-        if ( mrPBM.GetError() )
+        if (!mrPBM.good())
             return false;
 
         mrPBM.ReadUChar( nDat );


More information about the Libreoffice-commits mailing list