From 2a3efa7d61a7236b803703632ccba50b9d659c0a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 11 Aug 2010 13:17:47 +0000 Subject: Only decode as many rows as fit in the output buffer in the fax decoder, thus allowing garbage data at the end of fax images with no RTC and no Rows count. --- fitz/filt_faxd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fitz/filt_faxd.c') diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c index 66410660..e4a81724 100644 --- a/fitz/filt_faxd.c +++ b/fitz/filt_faxd.c @@ -684,6 +684,10 @@ eol: eatbits(fax, (8 - fax->bidx) & 7); } + /* no more space in output, don't decode the next line yet */ + if (p == buf + len) + return p - buf; + goto loop; rtc: -- cgit v1.2.3