[prev in list] [next in list] [prev in thread] [next in thread]
List: zlib-devel
Subject: [Zlib-devel] zlib 1.2.3.1 released for testing
From: madler () alumni ! caltech ! edu (Mark Adler)
Date: 2006-09-20 4:54:13
Message-ID: E1543049-9D7F-4AA1-9E41-D0CEC6817F0E () alumni ! caltech ! edu
[Download RAW message or body]
On Sep 19, 2006, at 7:31 PM, Cosmin Truta wrote:
> I don't think I like the idea of hurting zlib users who want the
> inflation as fast as possible, for the sake of sloppy web designers.
The modification I came up with does not slow down inflate. All of
the extra code is inside the if-statements that previously returned
the error condition. So no additional code is executed unless an
invalid distance too far is detected.
Dictionaries can in fact be set for raw inflate. However your
solution would require setting a 32K dictionary for every PNG image
decompression. Unfortunately, you don't know beforehand if the PNG
image is one of the invalid ones. That requires copying 32K bytes
every time. That would unnecessarily slow down the application in
question, which is a web browser that desperately wants to have
exactly the same buggy behavior as Internet Explorer. The
implemented solution only comes into play if and when the deflate
stream is discovered to be invalid.
mark
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic