[cairo-bugs] [Bug 15761] cairo_surface_set_device_offset crashes pidgin on windows

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jul 15 19:51:25 PDT 2008


http://bugs.freedesktop.org/show_bug.cgi?id=15761





--- Comment #12 from David Grohmann <dave1g at satx.rr.com>  2008-07-15 19:51:23 PST ---
(In reply to comment #11)
> (In reply to comment #8)
> > _gdk_drawable_ref_cairo_surface() can return NULL, but
> > gdk_window_begin_paint_region() does not check if it did so before passing the
> > result to cairo_surface_set_device_offset(), which also doesn't check if it's
> > NULL before dereferencing it. 
> 
> That's quite possible. And for cairo, this is the expected behavior of this
> function.
> 
> If a cairo function returns a cairo_status_t value, then it will return
> CAIRO_STATUS_NULL_POINTER if you pass it NULL. But the void functions
> will simply dereference the pointer and crash.
> 
> If you're interested in seeing that behavior change at all, then that
> would be a discussion to be had on the cairo mailing list, (see
> http://cairographics.org/lists )
> 
> -Carl
> 

Well I think I may have erred in filing this bug report here in the first
place, as that GTK function should be checking the return value of the other
GTK function first knowing that libcairo will happily crash on NULL input. 
It's just that the crash stack first implicated cairo, since that's the library
it crashed in.

I'm just trying to figure out who is to blame so I can get this fixed. If
either cairo, or GTK check for NULL before dereferencing then it solves the
problem, I will leave it up to the 2 development communities to choose who
should be the one checking.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the cairo-bugs mailing list