From b13b78a9067e069886379deec9cb3eaa1d85f91e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 24 Jan 2017 08:58:49 +0000 Subject: coverity#1399552 Unintended sign extension and coverity#1399551 Unintended sign extension Change-Id: Iedf7edf35f8b7985860fc254597776fbc1f561f5 --- vcl/source/filter/sgfbram.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index e25d01fe0afd..335ee7017623 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -294,7 +294,8 @@ bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&) //we're going to loop Ysize * XSize on GetByte, max compression for GetByte is a run of 63 //if we're less than that (and add a generous amount of wriggle room) then its not going //to fly - const sal_uInt64 nMinBytesPossiblyNeeded = rHead.Xsize * rHead.Ysize / 128; + sal_uInt64 nMinBytesPossiblyNeeded = rHead.Xsize; + nMinBytesPossiblyNeeded *= rHead.Ysize / 128; if (rInp.remainingSize() < nMinBytesPossiblyNeeded) return false; -- cgit