Skip to content

Commit

Permalink
oss-fuzz 42310: Fix validation of CFF CIDFont charstring length
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-liddell committed Dec 16, 2021
1 parent 1a3c64e commit a78a6db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf/pdf_font1C.c
Expand Up @@ -437,7 +437,7 @@ pdfi_cff_cid_glyph_data(gs_font_base *pbfont, gs_glyph glyph, gs_glyph_data_t *p
if (code >= 0) {
pdfi_countup(glyphname);
code = pdfi_dict_get_by_key(pdffont9->ctx, pdffont9->CharStrings, glyphname, (pdf_obj **) &charstring);
if (code >= 0 && charstring->length > 1) {
if (code >= 0 && charstring->length > gscidfont->cidata.FDBytes) {
if (gscidfont->cidata.FDBytes == 0)
*pfidx = 0;
else
Expand Down

0 comments on commit a78a6db

Please sign in to comment.