diff options
author | Tor Andersson <tor@ghostscript.com> | 2006-09-10 22:48:11 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2006-09-10 22:48:11 +0200 |
commit | 85f1fa95644dabfd3aafe40bab93e9d9539e59cf (patch) | |
tree | 153232f50c8688704e01e4ef033d1bc83c856b41 /stream/filt_null.c | |
parent | b86ee9d2c921001b8bb1aceac45f601489abb1e7 (diff) | |
download | mupdf-85f1fa95644dabfd3aafe40bab93e9d9539e59cf.tar.xz |
fix for empty filters in inline streams
Diffstat (limited to 'stream/filt_null.c')
-rw-r--r-- | stream/filt_null.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/filt_null.c b/stream/filt_null.c index d2c068e9..f51039b4 100644 --- a/stream/filt_null.c +++ b/stream/filt_null.c @@ -30,7 +30,9 @@ fz_processnullfilter(fz_filter *filter, fz_buffer *in, fz_buffer *out) fz_nullfilter *f = (fz_nullfilter*)filter; int n; - n = MIN(MIN(in->wp - in->rp, out->ep - out->wp), f->len - f->cur); + n = MIN(in->wp - in->rp, out->ep - out->wp); + if (f->len >= 0) + n = MIN(n, f->len - f->cur); if (n) { memcpy(out->wp, in->rp, n); |