mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-15 20:10:33 +01:00
type1: strip space from end of font name
This commit is contained in:
parent
ee0e2b9272
commit
b56b971141
1 changed files with 3 additions and 0 deletions
|
|
@ -420,6 +420,9 @@ cairo_type1_font_subset_get_fontname (cairo_type1_font_subset_t *font)
|
|||
if (end == NULL)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
while (end > start && _cairo_isspace(end[-1]))
|
||||
end--;
|
||||
|
||||
s = malloc (end - start + 1);
|
||||
if (unlikely (s == NULL))
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue