Please sign in to comment.
bug20742. Fix detection of invalid inflate headers
when creating an inflate-stream, one can optionally have the stream automatically detect and skip gzip or zlib headers and trailers. If the first byte checked (via read-byte) was an invalid header byte, we attempt to unread the byte read in via unread-char. 1. It is an error to unread-char when no read-char has been performed. 2. If the stream has a multi-byte external-format, the unread-char may inadvertently be unreading a multi-byte octet or invalid character. The fix made here is to bind the stream-external-format to :latin1, saving the original external-format and restoring it via an unwind-protect. Then, read-char is used to check the first byte, and unread-byte is used if the char does not match the expected first byte of a gzip or zlib stream. Are there user visible changes in this commit? yes/no Is bootstrapping needed? yes/no Are tests included for new features? Possible answers: Tests run: none / make all / other (specify) Change-Id: I6d431b80fba1fa92ad1e0b4fc6a9732e49484316
- Loading branch information...