[cairo] [PATCH 2/4] scaled fonts: Use wide enough type for pointer arithmetic
ajohnson at redneon.com
Sat Feb 20 22:49:11 UTC 2016
On 12/02/16 10:19, Simon Richter wrote:
> On 11.02.2016 21:00, Uli Schlachter wrote:
>> Where is this cast back to a pointer that you talk about?
> There are two instances in cairo-scaled-font.c, in lines 480 and 2827.
> Both of them read
> scaled_font = (cairo_scaled_font_t *) page->cache_entry.hash;
> and the pointer is dereferenced afterwards.
> I agree with your assessment that this should really be a hash value
> only, and using the lower bits might work for that (although the
> bottommost bits are probably all zero due to alignment, so it is not a
> very good hash), but fixing that requires more changes.
Attached is a patch to avoid storing the pointer in the hash value.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1753 bytes
Desc: not available
More information about the cairo