fix divide-by-zero in PictReader

regression from commit
  5772d98430
  Author: Noel Grandin <noel.grandin@collabora.co.uk>
  Date:   Tue Mar 24 15:07:00 2026 +0200
  Fraction->double in PictReader

Change-Id: I3c082b7441828c6290854a63a9c9f2384173d6bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202651
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2026-03-25 13:59:52 +01:00
parent 358c3eea27
commit 1279168289
+4 -2
View File
@@ -1259,8 +1259,10 @@ void PictReader::ReadHeader()
fHRes /= 65536;
double fVRes = nVResFixed;
fVRes /= 65536;
fHRes /= fHRes;
fVRes /= fVRes;
if (fHRes != 0)
mfHRes /= fHRes;
if (fVRes != 0)
mfVRes /= fVRes;
aBoundingRect=tools::Rectangle( x1,y1, x2, y2 );
pPict->SeekRel( 4 ); // 4 bytes reserved
return;