[cairo] protecting against too-big dimensions in XCreatePixture
Vladimir Vukicevic
vladimir at pobox.com
Mon Apr 7 22:11:42 PDT 2008
Howdy,
This is a variant of the cairo parts in Mats' patch in https://bugzilla.mozilla.org/show_bug.cgi?id=424333
-- essentially, we know that creating a pixmap bigger than SHRT_MAX
in either dimension will cause a BadAlloc error, so we can just avoid
that situation entirely and return an error. The patch just creates a
simple wrapper for XCreatePixmap and moves the <= 0 checking code in
here as well for clarity. How's this look?
- Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xlib-create-pixmap-dims.patch
Type: application/octet-stream
Size: 3466 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080407/2468f2ec/attachment.obj
-------------- next part --------------
More information about the cairo
mailing list