[cairo] Catching int overflows in allocations

Vladimir Vukicevic vladimir at pobox.com
Tue Jun 12 09:50:34 PDT 2007


The attached patch reworks a bunch of memory allocations in cairo to use 
two new functions, _cairo_malloc2/_cairo_malloc3, that know how to check 
for integer overflow before allocating.  The only things that weren't 
converted were a few complex allocations in the glitz surface; those can 
be done in a followup.  I also added a section to CODING_STYLE talking 
about using these functions -- I hope that's an appropriate place for this?

     - Vlad
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cairo-malloc.patch
Url: http://cairographics.org/archives/cairo/attachments/20070612/5829d8f2/attachment-0001.txt 


More information about the cairo mailing list