[cff-subset] check subrs offset is within font data

This commit is contained in:
Jonathan Kew 2026-04-18 13:17:19 +00:00 committed by Uli Schlachter
parent 9df734c87a
commit 86365d847b

View file

@ -930,6 +930,8 @@ cairo_cff_font_read_private_dict (cairo_cff_font_t *font,
if (operand) {
decode_integer (operand, &offset);
p = ptr + offset;
if (unlikely (p < font->data || p > font->data_end))
return CAIRO_INT_STATUS_UNSUPPORTED;
status = cff_index_read (local_sub_index, &p, font->data_end);
if (unlikely (status))
return status;