diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-05-19 09:26:20 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-05-19 09:27:48 +0100 |
commit | 7ab96e83d85165801894e887816db6042ea2f9be (patch) | |
tree | f558a415dd1d25e76e5c206615896173d2c2a7b9 | |
parent | 3722c050513e66c7aeaa63981e4e9f03ee0a3491 (diff) | |
download | ghostpdl-7ab96e83d85165801894e887816db6042ea2f9be.tar.gz |
oss-fuzz 47499: reading xref, check starting object num is positive
-rw-r--r-- | pdf/pdf_xref.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pdf/pdf_xref.c b/pdf/pdf_xref.c index b0912d221..3142f2ef1 100644 --- a/pdf/pdf_xref.c +++ b/pdf/pdf_xref.c @@ -660,6 +660,9 @@ static int read_xref_section(pdf_context *ctx, pdf_c_stream *s, uint64_t *sectio return 1; } + if (start < 0) + return_error(gs_error_rangecheck); + *section_start = start; code = pdfi_read_bare_int(ctx, ctx->main_stream, &size); |