[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - filter/qa tools/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 17 05:22:49 PDT 2015
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 f37d7df1696c089206c5922814c28553a08117aa
Author: Caolán McNamara <caolanm at 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/17160
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at 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 faf6e09..886b896 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1465,7 +1465,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;
}
More information about the Libreoffice-commits
mailing list