[Poppler-bugs] [Bug 100774] poppler 0.54.0: stack buffer overflow in GfxImageColorMap::getGray

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 28 13:18:37 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100774

--- Comment #2 from Adrian Johnson <ajohnson at redneon.com> ---
The code is checking what color the value zero maps to. The existing call to
colorMap->getGray(&zero, &gray); should be fine as GfxImageColorMap::getGray()
handles colorSpace2 internally.

Instead of adding a getNumPixelComps2() function it would better to check if
colorSpace2 is not null and handle it inside getNumPixelComps() like is done
with some of the other functions in GfxImageColorMap. The value returned by
getNumPixelComps() should match the number of components returned by getGray()
and getRGB(). getGray() and getRGB() check for and use colorSpace2 so
getNumPixelComps() should return colorSpace2 num components when colorSpace2 is
not null.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20170428/3c64e7a6/attachment.html>


More information about the Poppler-bugs mailing list