mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-18 21:20:38 +02:00
Merge branch 'font-parse-oob' into 'master'
Add a bounds check to cairo_cff_font_read_fdselect() Closes #451 See merge request cairo/cairo!103
This commit is contained in:
commit
891468f191
1 changed files with 2 additions and 0 deletions
|
|
@ -991,6 +991,8 @@ cairo_cff_font_read_fdselect (cairo_cff_font_t *font, unsigned char *p)
|
|||
p += 2;
|
||||
fd = *p++;
|
||||
last = get_unaligned_be16 (p);
|
||||
if (last > font->num_glyphs)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
for (j = first; j < last; j++)
|
||||
font->fdselect[j] = fd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue