From 227b68bb1a6d76f4224985af1993ae17e2bf0931 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 25 Jan 2012 13:50:34 +0000 Subject: 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 --- fitz/filt_faxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fitz/filt_faxd.c') 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); -- cgit v1.2.3