summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-09-19 08:05:53 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-09-19 11:05:37 +0100
commit9e6faf9495945ba6471f693fe01a0f1d1f538edf (patch)
tree4c7cf4c45874b75c944308cabbd9db00f747c40f
parent09bcd1679eb924399acfba96df84c57655c4a803 (diff)
downloadghostpdl-9e6faf9495945ba6471f693fe01a0f1d1f538edf.tar.gz
GhostPDF - check object type in Parent handling
OSS-fuzz #51556 If we get an error from pdfi_dict_get_no_store_R() we also get a null object returned, so we need to take action on a returned error to reset the Parent pointer to NULL so that we don't try to process it.
-rw-r--r--pdf/pdf_doc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pdf/pdf_doc.c b/pdf/pdf_doc.c
index c12d8d120..b8bcf8332 100644
--- a/pdf/pdf_doc.c
+++ b/pdf/pdf_doc.c
@@ -954,7 +954,8 @@ int pdfi_find_resource(pdf_context *ctx, unsigned char *Type, pdf_name *name,
Parent = NULL;
}
}
- }
+ } else
+ Parent = NULL;
}
if (Parent != NULL) {