filter/qa/cppunit/data/tiff/fail/hang-4.tiff |binary tools/source/stream/stream.cxx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1d43b962d28641428007eedfe8dfdcc8ec3f8044 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 17 10:26:46 2015 +0100 in remainingSize consider that its is possible to seek past the end Change-Id: I1652244d5515629f1cd8f15f4c5b15f139dba0aa (cherry picked from commit 6a1f31898d4d44d69f4f65e56f5dd087607885af) Reviewed-on: https://gerrit.libreoffice.org/17158 Reviewed-by: David Tardon <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> diff --git a/filter/qa/cppunit/data/tiff/fail/hang-4.tiff b/filter/qa/cppunit/data/tiff/fail/hang-4.tiff new file mode 100644 index 0000000..4048941 Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/hang-4.tiff differ diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 002d9e5..bb6d21e 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1464,7 +1464,7 @@ sal_uInt64 SvStream::remainingSize() { sal_uInt64 const nCurr = Tell(); sal_uInt64 const nEnd = Seek(STREAM_SEEK_TO_END); - sal_uInt64 nMaxAvailable = nEnd-nCurr; + sal_uInt64 nMaxAvailable = nEnd > nCurr ? (nEnd-nCurr) : 0; Seek(nCurr); return nMaxAvailable; }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits