diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-07-10 12:58:57 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-08-10 12:09:33 +0200 |
commit | 09f2e173850e011e6390c49a4f761e87dd87ffba (patch) | |
tree | 6026165eb2c859792e1c9c3578d470a4e6837f72 /source/fitz/unzip.c | |
parent | 62876a7025e31897e7ccb92ff8d461d3fef6ddb4 (diff) | |
download | mupdf-09f2e173850e011e6390c49a4f761e87dd87ffba.tar.xz |
Clean up null/range/endstream filter.
Use separate functions to keep the code simpler.
Use memmem to simplify and optimize search for 'endstream' token.
Do not look for 'endobj' since that could cause a false positives in
compressed object streams that have duff lengths.
Diffstat (limited to 'source/fitz/unzip.c')
-rw-r--r-- | source/fitz/unzip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c index 4eb90dda..dfe4fb6b 100644 --- a/source/fitz/unzip.c +++ b/source/fitz/unzip.c @@ -286,7 +286,7 @@ static fz_stream *open_zip_entry(fz_context *ctx, fz_archive *arch, const char * method = read_zip_entry_header(ctx, zip, ent); if (method == 0) - return fz_open_null(ctx, file, ent->usize, fz_tell(ctx, file)); + return fz_open_null_filter(ctx, file, ent->usize, fz_tell(ctx, file)); if (method == 8) return fz_open_flated(ctx, file, -15); fz_throw(ctx, FZ_ERROR_GENERIC, "unknown zip method: %d", method); |