[Poppler-bugs] [Bug 97870] Crash when calling cmsGetColorSpace

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 21 10:36:09 UTC 2016


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

Marek Kasik <mkasik at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #126645|0                           |1
        is obsolete|                            |

--- Comment #3 from Marek Kasik <mkasik at redhat.com> ---
Created attachment 126698
  --> https://bugs.freedesktop.org/attachment.cgi?id=126698&action=edit
Don't crash when calling cmsGetColorSpace()

(In reply to Carlos Garcia Campos from comment #2)
> (In reply to Marek Kasik from comment #1)
> > Created attachment 126645 [details] [review] [review]
> > Don't crash when calling cmsGetColorSpace()
> > 
> > This patch fixes the problem for me.
> 
> Is that the only place where all those global variables could be used
> uninitialized? GfxColorSpace::setupColorProfiles() is already protected to
> ensure it only happens once even if called multiple times, so I think it
> would be simpler to call it unconditionally before trying to use RGBProfile.

Some of those variables can be used uninitialized via getters like:
  GfxColorSpace::getRGBProfile()
  GfxColorSpace::getDisplayProfile()

The XYZ2DisplayTransform is also used in some ::parse() methods but these
usages are guarded by consequent NULL checks.

I've changed the patch to call the setup of color profiles unconditionally.

-- 
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/20160921/f022e3cb/attachment.html>


More information about the Poppler-bugs mailing list