diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-08-23 16:06:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-08-23 16:06:59 +0200 |
commit | 0a0b1a15a240ef104030c137721ddaa436695ef6 (patch) | |
tree | de1fcc903cea258507f8ff760520034aa1a7ea37 | |
parent | 57db2d1ea41d268b61f490b8cd52889e15d2d983 (diff) | |
download | mupdf-0a0b1a15a240ef104030c137721ddaa436695ef6.tar.xz |
Make sure we finish processing the head filter in a pipeline when the tail is done. The head filter may have unprocessed EOD markers left even after the tail has finished processing.
-rw-r--r-- | fitz/filt_pipeline.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fitz/filt_pipeline.c b/fitz/filt_pipeline.c index 85dc1f82..eec24803 100644 --- a/fitz/filt_pipeline.c +++ b/fitz/filt_pipeline.c @@ -129,7 +129,15 @@ tail: } else if (e == fz_iodone) + { + /* Make sure that the head is also done. + * It may still contain end-of-data markers or garbage. + */ + e = fz_process(p->head, in, p->buffer); + if (e != fz_iodone) + fz_catch(e, "head filter not done"); return fz_iodone; + } else if (e) return fz_rethrow(e, "cannot process tail filter"); |