Skip to content

Commit 801ffe7

Browse files
author
sjw
committed
Processed pdf files can not exceed 2GB
1 parent 4994693 commit 801ffe7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/pdf/pdf-xref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pdf_read_start_xref(hd_context *ctx, pdf_document *doc)
336336
doc->startxref = 0;
337337
while (i < n && buf[i] >= '0' && buf[i] <= '9')
338338
{
339-
if (doc->startxref >= INT64_MAX/10)
339+
if (doc->startxref >= INT32_MAX)
340340
hd_throw(ctx, HD_ERROR_GENERIC, "startxref too large");
341341
doc->startxref = doc->startxref * 10 + (buf[i++] - '0');
342342
}

0 commit comments

Comments
 (0)