type1: strip space from end of font name

This commit is contained in:
Adrian Johnson 2014-01-11 20:49:05 +10:30
parent ee0e2b9272
commit b56b971141

View file

@ -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);