diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2022-09-19 08:05:53 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2022-09-19 11:05:37 +0100 |
commit | 9e6faf9495945ba6471f693fe01a0f1d1f538edf (patch) | |
tree | 4c7cf4c45874b75c944308cabbd9db00f747c40f | |
parent | 09bcd1679eb924399acfba96df84c57655c4a803 (diff) | |
download | ghostpdl-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.c | 3 |
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) { |