summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-12-16 15:11:42 +0000
committerKen Sharp <ken.sharp@artifex.com>2022-12-16 15:11:42 +0000
commit2a62bab98d3b3fd8c47e3059fbdec33783e938f8 (patch)
tree7f35c071332b8bda7997bbaa4a8e502c4ea663da /pdf
parent5e6e32577a3943d4b838f1bca69193bcb0ec9cfb (diff)
downloadghostpdl-2a62bab98d3b3fd8c47e3059fbdec33783e938f8.tar.gz
GhostPDF - warn on attempts to access object 0
Bug691740.pdf We correctly handled this, but silently unless PDFSTOPONERROR was set. This just logs the error for reporting.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_deref.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf/pdf_deref.c b/pdf/pdf_deref.c
index 3d6d039ad..859902afe 100644
--- a/pdf/pdf_deref.c
+++ b/pdf/pdf_deref.c
@@ -923,8 +923,10 @@ static int pdfi_dereference_main(pdf_context *ctx, uint64_t obj, uint64_t gen, p
entry = &ctx->xref_table->xref[obj];
- if(entry->object_num == 0)
+ if(entry->object_num == 0) {
+ pdfi_set_error(ctx, 0, NULL, E_PDF_BADOBJNUMBER, "pdfi_dereference_main", "Attempt to dereference object 0");
return_error(gs_error_undefined);
+ }
if (entry->free) {
char extra_info[gp_file_name_sizeof];