[Poppler-bugs] [Bug 58032] Crash when doing patterns over a mono1 outputdev
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Dec 9 01:58:13 PST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=58032
--- Comment #2 from Thomas Freitag <Thomas.Freitag at alfa.de> ---
First of all, a rowPad of 0 doesn't make any sense (rowPad of 1 means byte
boundary, what should then be a rowPad = 0), so the error is in (my)
SplashOutputDev::tilingPatternFill, it should be
bitmap = new SplashBitmap(surface_width, surface_height, 1,
(paintType == 1) ? colorMode : splashModeMono8,
gTrue);
instead of
bitmap = new SplashBitmap(surface_width, surface_height, colorMode !=
splashModeMono1,
(paintType == 1) ? colorMode : splashModeMono8,
gTrue);
(who ever insert this curious code :-) )
But because rowPad is a parameter of SplashoutputDev, and anybody can make the
same mistake than I, it's probably a good idea to avoid dividing by 0. But I
would then change it to
if (rowSize > 0 && rowPad > 1) {
rowSize += rowPad - 1;
rowSize -= rowSize % rowPad;
}
(why calling statements which change nothing in case of rowPad = 1)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20121209/9b789c81/attachment.html>
More information about the Poppler-bugs
mailing list