diff options
-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 6aa5296e1..b73f2cd5d 100644 --- a/pdf/pdf_xref.c +++ b/pdf/pdf_xref.c @@ -68,6 +68,9 @@ static int read_xref_stream_entries(pdf_context *ctx, pdf_c_stream *s, int64_t f field_width = W[2]; Buffer = gs_alloc_bytes(ctx->memory, field_width, "read_xref_stream_entry working buffer"); + if (Buffer == NULL) + return_error(gs_error_VMerror); + for (i=first;i<=last; i++){ /* Defaults if W[n] = 0 */ type = 1; |