diff options
Diffstat (limited to 'pdf/pdf_int.c')
-rw-r--r-- | pdf/pdf_int.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_int.c b/pdf/pdf_int.c index 5a78f134c..20bb743f3 100644 --- a/pdf/pdf_int.c +++ b/pdf/pdf_int.c @@ -262,7 +262,7 @@ static int pdfi_read_num(pdf_context *ctx, pdf_c_stream *s, uint32_t indirect_nu if (c >= '0' && c <= '9') { if (!(malformed && recovered) && !overflowed && !real) { - if ((negative && (int_val < tenth_max_int)) || int_val < tenth_max_uint) + if ((negative && int_val < tenth_max_int) || (!negative && int_val < tenth_max_uint)) int_val = int_val*10 + c - '0'; else { pdfi_set_error(ctx, 0, NULL, E_PDF_NUMBEROVERFLOW, "pdfi_read_num", NULL); |