diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index af1e4a5dbeb03add0b8317c5d55ebd94d37a6f53..e085ee0d6e980ad28cfce787d9d915af92b76e04 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -298,6 +298,12 @@ struct sbix const PNGHeader &png = *blob->as(); + 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;