[gs-commits] mupdf/master - 0_8-15-gcd86485 - Fix integer overflow in compression bomb multiplication by using a division instead.

Tor Andersson tor at ghostscript.com
Fri Mar 11 00:03:14 UTC 2011


commit cd86485e4596b2bddb6145a4e9a75345e89f65ba
Author: Tor Andersson <tor at ghostscript.com>
Date:   Thu Mar 10 00:03:16 2011 +0000

    Fix integer overflow in compression bomb multiplication by using a division instead.
    
    Ignore-this: 2a9eaeb4dae1704a7a005c975cba9722
    
    darcs-hash:20110310000316-f546f-5f419da2c2c97ae9c8cd053fbf34ddb3db61bdfe.gz

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

diff --git a/fitz/stm_read.c b/fitz/stm_read.c
index e5ead91..10626e5 100644
--- a/fitz/stm_read.c
+++ b/fitz/stm_read.c
@@ -110,7 +110,7 @@ fz_readall(fz_buffer **bufp, fz_stream *stm, int initial)
 		if (buf->len == buf->cap)
 			fz_growbuffer(buf);
 
-		if (buf->len > initial * 200)
+		if (buf->len / 200 > initial)
 		{
 			fz_dropbuffer(buf);
 			return fz_throw("compression bomb detected");

--
git/hooks/post-receive


More information about the gs-commits mailing list