[gs-commits] mupdf/master - 0_6-265-g0252af4 - 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.

Tor Andersson tor at ghostscript.com
Wed Aug 18 13:10:40 UTC 2010


commit 0252af4aecefb23273ac43816ecd0d289d1c00a7
Author: Tor Andersson <tor at ghostscript.com>
Date:   Wed Aug 11 13:17:47 2010 +0000

    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.
    
    Ignore-this: 374b8965e9e8f683115887da826a1a31
    
    darcs-hash:20100811131747-f546f-ef3780210570146256406df5667a9210ca75efd0.gz

 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c
index 6641066..e4a8172 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:

--
git/hooks/post-receive


More information about the gs-commits mailing list