diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-25 13:50:34 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-01-25 13:50:34 +0000 |
commit | 227b68bb1a6d76f4224985af1993ae17e2bf0931 (patch) | |
tree | 48fae006704b799748eb7ed4ec3ac6cc81dec87f | |
parent | af2998fa966f4cd83d503b208fc9e3a24e9a2397 (diff) | |
download | mupdf-227b68bb1a6d76f4224985af1993ae17e2bf0931.tar.xz |
Fix bug in Fax decoder.
Thanks to Zeniko for this; one line fix in the fax decoder, to
cope with a case at the start of lines.
This fixes:
x - 1d faxd overflow.pdf
and
x - 1d faxd negative code.pdf
-rw-r--r-- | fitz/filt_faxd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c index 927bf4c4..7ccebddb 100644 --- a/fitz/filt_faxd.c +++ b/fitz/filt_faxd.c @@ -211,7 +211,7 @@ find_changing_color(const unsigned char *line, int x, int w, int color) if (!line) return w; - x = find_changing(line, x, w); + x = find_changing(line, (x > 0 || !color) ? x : -1, w); if (x < w && getbit(line, x) != color) x = find_changing(line, x, w); |