Kaydet (Commit) 07bedabb authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

in remainingSize consider that its is possible to seek past the end

Change-Id: I1652244d5515629f1cd8f15f4c5b15f139dba0aa
(cherry picked from commit 6a1f3189)
Reviewed-on: https://gerrit.libreoffice.org/17158Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst e5d8a9d1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment