summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-03-10 15:21:11 +0000
committerChris Liddell <chris.liddell@artifex.com>2022-03-14 13:31:38 +0000
commitd115cfcb622db3cf7649fbaff2f65f1fe3b14cd4 (patch)
tree87f6c7007fdf5efbc6de7d9c4fff4ec9be87ca68
parent02352ab7753ba74bbfdfa31227932a7809465ef4 (diff)
downloadghostpdl-d115cfcb622db3cf7649fbaff2f65f1fe3b14cd4.tar.gz
oss-fuzz 45439: CFF CIDFonts - allow zero length charstrings
-rw-r--r--pdf/pdf_font1C.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_font1C.c b/pdf/pdf_font1C.c
index 8ac228ab4..f4788845f 100644
--- a/pdf/pdf_font1C.c
+++ b/pdf/pdf_font1C.c
@@ -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 > gscidfont->cidata.FDBytes) {
+ if (code >= 0 && charstring->length >= gscidfont->cidata.FDBytes) {
if (gscidfont->cidata.FDBytes != 0) {
if ((int)charstring->data[0] > gscidfont->cidata.FDArray_size)
code = gs_note_error(gs_error_invalidfont);