Summary: | evince crashed with SIGSEGV in cairo_image_surface_get_width( | ||
---|---|---|---|
Product: | cairo | Reporter: | Pedro Villavicencio <pvillavi> |
Component: | general | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED NOTOURBUG | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | critical | ||
Priority: | medium | CC: | cloos |
Version: | 1.5.8 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Pedro Villavicencio
2008-02-27 06:03:21 UTC
Evince is passing a NULL pointer to cairo_image_surface_get_width. So that's a bug in evince that should be fixed. The crash in cairo is quite legitimate in this scenario. -Carl Would it not be appropriate for cairo_image_surface_get_width() to throw a @CAIRO_STATUS_NULL_POINTER in that case rather than allow the null pointer to be dereferenced in _cairo_surface_is_image()? Something like: if (!surface) { _cairo_error_throw (CAIRO_STATUS_NULL_POINTER); return 0; } It would be needed of course in each of the cairo_image_surface_get... funtions before the if (!_cairo_surface_is_image (surface)) { _cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH); return 0; } blocks. I suppose the question is just how vigilant cairo should be in avoiding SEGVs from bogus input? |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.