mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 05:18:01 +02:00
fix read memory access
This commit is contained in:
parent
48a4466631
commit
9a2385d412
1 changed files with 4 additions and 0 deletions
|
|
@ -1185,6 +1185,8 @@ cairo_cff_font_read_top_dict (cairo_cff_font_t *font)
|
|||
goto fail;
|
||||
|
||||
element = _cairo_array_index (&index, 0);
|
||||
if (element == NULL)
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
status = cff_dict_read (font->top_dict, element->data, element->length);
|
||||
if (unlikely (status))
|
||||
goto fail;
|
||||
|
|
@ -3128,6 +3130,8 @@ _cairo_cff_scaled_font_is_cid_cff (cairo_scaled_font_t *scaled_font)
|
|||
goto fail2;
|
||||
|
||||
element = _cairo_array_index (&index, 0);
|
||||
if (element == NULL)
|
||||
goto fail3;
|
||||
status = cff_dict_read (top_dict, element->data, element->length);
|
||||
if (unlikely (status))
|
||||
goto fail3;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue