mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 11:38:16 +02:00
Range-check FDSelect value during CFF subsetting.
This commit is contained in:
parent
7dc050967f
commit
d80b44afa4
1 changed files with 4 additions and 0 deletions
|
|
@ -1876,6 +1876,10 @@ cairo_cff_font_subset_fontdict (cairo_cff_font_t *font)
|
|||
}
|
||||
|
||||
fd = font->fdselect[gid];
|
||||
if (fd < 0 || (unsigned int) fd >= font->num_fontdicts) {
|
||||
free (reverse_map);
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
}
|
||||
if (reverse_map[fd] < 0) {
|
||||
font->fd_subset_map[font->num_subset_fontdicts] = fd;
|
||||
reverse_map[fd] = font->num_subset_fontdicts++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue