summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2018-05-31 15:59:53 +0100
committerRobin Watts <robin.watts@artifex.com>2018-07-06 18:00:03 +0100
commit75c457ddd28a629a9e1d6e1a8fa313ffef1457cb (patch)
tree96099a85afbfcaa5af457aa230dfcb89fbd99825 /include
parent533684eb51bb72df871a63eb17e589e2ec9bb547 (diff)
downloadmupdf-75c457ddd28a629a9e1d6e1a8fa313ffef1457cb.tar.xz
Bug 699308: Fix stream reading logic to better cope with duff Lengths.
Always look for the "endstream" marker after a PDF stream to see if we've hit the end. Allow for "endobj" to cope with producers that omit endstream entirely. Avoid slowing down legal files by only checking for the end marker after the specified length has been read.
Diffstat (limited to 'include')
-rw-r--r--include/mupdf/fitz/filter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mupdf/fitz/filter.h b/include/mupdf/fitz/filter.h
index a570dd71..bdce36e8 100644
--- a/include/mupdf/fitz/filter.h
+++ b/include/mupdf/fitz/filter.h
@@ -17,6 +17,7 @@ typedef struct
fz_stream *fz_open_null_n(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges);
fz_stream *fz_open_null(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
+fz_stream *fz_open_pdf_stream(fz_context *ctx, fz_stream *chain, int len, int64_t offset);
fz_stream *fz_open_concat(fz_context *ctx, int max, int pad);
void fz_concat_push_drop(fz_context *ctx, fz_stream *concat, fz_stream *chain); /* Ownership of chain is passed in */
fz_stream *fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);