<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crash when doing patterns over a mono1 outputdev"
href="https://bugs.freedesktop.org/show_bug.cgi?id=58032#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crash when doing patterns over a mono1 outputdev"
href="https://bugs.freedesktop.org/show_bug.cgi?id=58032">bug 58032</a>
from <span class="vcard"><a class="email" href="mailto:Thomas.Freitag@alfa.de" title="Thomas Freitag <Thomas.Freitag@alfa.de>"> <span class="fn">Thomas Freitag</span></a>
</span></b>
<pre>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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>