[svg] Add document bounds checking
Add a check that the document content is actually contained within the
SVG
table. Without this check a malformed font may claim arbitrary
memory as its document content.
- src/sfnt/ttsvg.c (tt_face_load_svg): take numEntries into account when
testing documentRecord extents. (find_doc): rename
stream
todocument_records
for clarity. (tt_face_load_svg_doc): splitdoc
fromdoc_list
pointer for clarity. Test that the document content is contained within the table. Ensure minimum length of document before testing for gzip format.
Reported as:
Edited by Ben Wagner