mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-06 08:08:04 +02:00
Merge branch 'fdselect-range' into 'master'
Range-check FDSelect value See merge request cairo/cairo!660
This commit is contained in:
commit
c85d74aa5a
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