Summary: | Crash when doing patterns over a mono1 outputdev | ||
---|---|---|---|
Product: | poppler | Reporter: | Albert Astals Cid <aacid> |
Component: | splash backend | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Albert Astals Cid
2012-12-08 22:11:45 UTC
So, Thomas, what's your opinion? 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) In the quest for the smallest change i've just changed the first (i.e. colorMode != splashModeMono1 -> 1) in the "new SplashBitmap" |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.