summaryrefslogtreecommitdiff
path: root/fitz/filt_faxd.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-01-25 13:50:34 +0000
committerRobin Watts <robin.watts@artifex.com>2012-01-25 13:50:34 +0000
commit227b68bb1a6d76f4224985af1993ae17e2bf0931 (patch)
tree48fae006704b799748eb7ed4ec3ac6cc81dec87f /fitz/filt_faxd.c
parentaf2998fa966f4cd83d503b208fc9e3a24e9a2397 (diff)
downloadmupdf-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
Diffstat (limited to 'fitz/filt_faxd.c')
-rw-r--r--fitz/filt_faxd.c2
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);