Skip to content

Commit

Permalink
[sbix] Limit glyph extents
Browse files Browse the repository at this point in the history
Fixes #3557
  • Loading branch information
behdad committed Jun 1, 2022
1 parent cd05d18 commit 62e803b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hb-ot-color-sbix-table.hh
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ struct sbix

const PNGHeader &png = *blob->as<PNGHeader>();

if (png.IHDR.height >= 65536 | png.IHDR.width >= 65536)
{
hb_blob_destroy (blob);
return false;
}

extents->x_bearing = x_offset;
extents->y_bearing = png.IHDR.height + y_offset;
extents->width = png.IHDR.width;
Expand Down
Binary file added test/fuzzing/fonts/sbix-extents.ttf
Binary file not shown.

0 comments on commit 62e803b

Please sign in to comment.