diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-11-01 01:18:02 +0800 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-11-01 14:03:03 +0100 |
commit | fd1976035e0b7614bedd440763fbe17a61a583d7 (patch) | |
tree | a082f6a33d375f55456166f8e787a9cda365fb06 /source/pdf | |
parent | a7d88907ee4f2f925459048b728a573c3c0641cf (diff) | |
download | mupdf-fd1976035e0b7614bedd440763fbe17a61a583d7.tar.xz |
When hinted object is not found, avoid return from within fz_try().
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-xref.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index 070e0946..2c964e90 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -1968,7 +1968,7 @@ read_hinted_object(fz_context *ctx, pdf_document *doc, int num) expected--; if (expected != num) DEBUGMESS((ctx, "object %d is unhinted, will search forward from %d", expected, num)); - if (expected == 0) /* No hints found, just bale */ + if (expected == 0) /* No hints found, just bail */ return 0; curr_pos = fz_tell(ctx, doc->file); @@ -2005,8 +2005,8 @@ read_hinted_object(fz_context *ctx, pdf_document *doc, int num) doc->hint_obj_offsets[found+1] = offset; while (doc->hint_obj_offsets[expected] == 0 && expected > 0) expected--; - if (expected == 0) /* No hints found, just bale */ - return 0; + if (expected == 0) /* No hints found, we give up */ + break; } } while (found != num); @@ -2023,7 +2023,7 @@ read_hinted_object(fz_context *ctx, pdf_document *doc, int num) doc->hint_obj_offsets[expected] = 0; fz_rethrow(ctx); } - return 1; + return expected != 0; } pdf_xref_entry * |