[webkit-reviews] review granted: [Bug 56201] WebKitIconDatabase may trigger crash in cairoImageSurfaceToGdkPixbuf : [Attachment 85487] Don't attempt to make a pixbuf if there is no image

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 15 08:49:48 PDT 2011


Martin Robinson <mrobinson at webkit.org> has granted Christian Dywan
<christian at twotoasts.de>'s request for review:
Bug 56201: WebKitIconDatabase may trigger crash in cairoImageSurfaceToGdkPixbuf
https://bugs.webkit.org/show_bug.cgi?id=56201

Attachment 85487: Don't attempt to make a pixbuf if there is no image
https://bugs.webkit.org/attachment.cgi?id=85487&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=85487&action=review

Looks good. Does  this fix the crasher or are there more?

> Source/WebCore/platform/graphics/gtk/ImageGtk.cpp:157
> +    if (!frameAtIndex(currentFrame()))
> +	   return 0;
>      return cairoImageSurfaceToGdkPixbuf(frameAtIndex(currentFrame()));

Please make this simple change before landing.

cairo_surface_t* frame = frameAtIndex(currentFrame());
if (!frame)
    return 0;
return cairoImageSurfaceToGdkPixbuf(frame);


More information about the webkit-reviews mailing list