Re: [PATCH 1/2] Don't return NULL to clients when getting image

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Mon, Sep 22, 2014 at 03:50:25PM -0700, Bryce Harrington wrote:
> diff --git a/src/win32/cairo-win32-surface.c b/src/win32/cairo-win32-surface.c
> index 7cd46fc..f11cbd8 100644
> --- a/src/win32/cairo-win32-surface.c
> +++ b/src/win32/cairo-win32-surface.c
> @@ -188,7 +188,7 @@ cairo_surface_t *
>  cairo_win32_surface_get_image (cairo_surface_t *surface)
>  {
>      if (surface->backend->type != CAIRO_SURFACE_TYPE_WIN32)

This is still dangerous - error surfaces have no surface->backend to
dereference.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.