vcl/source/filter/ixbm/xbmread.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit d4873496e8c74192f50f061cd8ab512e706a44ad Author: Caolán McNamara <caol...@redhat.com> Date: Tue Mar 14 21:23:12 2017 +0000 return early on clearly broken xbms Change-Id: Ic94a75aacb6bcd47d594a12e0df999a58b04b061 diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index 38475fd..d3d21c4 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -308,6 +308,11 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) else bStatus = false; + //xbms are a minimum of one character per 8 pixels, so if the file isn't + //even that long, its not all there + if (rIStm.remainingSize() < (static_cast<sal_uInt64>(nWidth) * nHeight) / 8) + bStatus = false; + if ( bStatus && nWidth && nHeight ) { aBmp1 = Bitmap( Size( nWidth, nHeight ), 1 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits