[cairo] X crash with BadAlloc with too-large pixmap

Behdad Esfahbod behdad at behdad.org
Thu Jul 10 04:42:00 PDT 2008


On Wed, 2008-07-09 at 16:11 -0700, Vladimir Vukicevic wrote:
> On Jun 30, 2008, at 4:28 PM, Behdad Esfahbod wrote:
> 
> > On Mon, 2008-06-30 at 10:32 -0700, Vladimir Vukicevic wrote:
> >> Don't think I got a response last time -- any thoughts on this?
> The
> >> fix seems reasonable to me, though I'd probably change the function
> >> name to _cairo_safe_XCreatePixmap or somesuch.
> >
> > Good to go.  Please file a bug against GTK+ too.
> 
> Slightly different patch, let me know if this works for you as
> well.   
> I just added width/height checks where necessary, to avoid creating  
> the helper function (and exposing it).  I'll file a bug against GTK+  
> to audit XCreatePixmap calls.

I slightly like the older patch as that makes it harder to introduce the
bug again when adding new XCreatePixmap calls.  (currently at GUADEC,
very slow at testing.  Go ahead and push...)

behdad

>     - Vlad
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



More information about the cairo mailing list