[cairo] Catching int overflows in allocations
vladimir at pobox.com
Tue Jun 19 13:25:07 PDT 2007
Ok, converted to _cairo_malloc_ab, _abc, and _ab_plus_c.. also fixed
other review comments. Here's the patch:
It's sitting in an int-overflow branch in my repo. Most of it is
boilerplate conversions of malloc(a*sizeof(t)) -> _cairo_malloc_ab(a,
sizeof(t)) and the like, though there are a few bigger changes..
pixregion.c has a bit more work, since it wants to calculate the byte
size of a region separately from allocating it, and cairo-glitz-surface
wanted essentially malloc_ab_plus_cd and malloc_ab_plus_cde, so I just
expanded those out in the code.
More information about the cairo