Re: [PATCH 2/4] scaled fonts: Use wide enough type for pointer arithmetic

Simon Richter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

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.

   Simon

-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWvR39AAoJEH69OHuwmQgR1IcIAKZ7f+YdakH3WLxUoGTPqZh1
2amxRhZuGZxDYez4mwg9Ktz9oxKNBF+4FLhofdlFOYvy1YLohUQjWdvHkIojSZPe
ZaG9B47Dyzc+TsnZlM+XQVrCfyI1gzZgVCmcZ0o/oQ7aQSzaCc91fqxcwzmA8EKh
39zt8Xyyd5TYXTBzgyqCOScglwxGSs1t76bWkBx4m7NvA2eGvqM0h1iqGiJWv1id
9hd1E5KQ2lSjNvd6z1jlxMGcUkqa4qx5S7VSFebsELBla+F91D0Dz0TjJ3aR3t57
cC6gQf/Vh0JK6UD+i7YoBd9Udm9Co7F391elUJWdlEq5qSBAVtaJVdn768jFXlA=
=binE
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.