[HarfBuzz] patch for hb-ot-layout.cc to prevent null-deref

Jonathan Kew jonathan at jfkew.plus.com
Mon Aug 16 06:55:54 PDT 2010


It looks to me like the _get_gdef, _get_gsub, and _get_gpos functions in hb-ot-layout.cc need an additional null-check, for the case where the face is actually the dummy _hb_face_nil object; this has no ot_layout, and therefore these functions risk deref'ing a null pointer.

I ran into this in the course of investigating a 'head' table issue (see following mail).

Suggested patch is attached.

JK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hb-ot-layout.patch
Type: application/octet-stream
Size: 1074 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20100816/6e9ea97f/attachment.obj>
-------------- next part --------------




More information about the HarfBuzz mailing list