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/untar.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/untar.c')
-rw-r--r-- | source/fitz/untar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/untar.c b/source/fitz/untar.c index 1588a8ac..9aac222b 100644 --- a/source/fitz/untar.c +++ b/source/fitz/untar.c @@ -118,7 +118,7 @@ static fz_stream *open_tar_entry(fz_context *ctx, fz_archive *arch, const char * fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find named tar archive entry"); fz_seek(ctx, file, ent->offset + 512, 0); - return fz_open_null(ctx, file, ent->size, fz_tell(ctx, file)); + return fz_open_null_filter(ctx, file, ent->size, fz_tell(ctx, file)); } static fz_buffer *read_tar_entry(fz_context *ctx, fz_archive *arch, const char *name) |