Alternative nSelectors patch (Was: bzip2 1.0.7 released)

Mark Wielaard mark@klomp.org
Tue Jan 1 00:00:00 GMT 2019


Hi,

On Fri, 2019-06-28 at 13:10 +0200, Mark Wielaard wrote:
> > It seems to me to be important to now split BZ_MAX_SELECTORS into these two
> > parts so as to make it clear to everybody that we're accepting (decompressing)
> > a slightly larger set of inputs than we create (a la that old saying about
> > network protocol implementations), so as to tolerate other compressors.
> 
> That seems good. The attached patch does this and makes it possible to
> decode the problematic bz2 file.

Sorry, it is a bit too late here to properly document this patch and
explain why I think it is a better one than the "split-max-selectors"
fix. But hopefully the new testsuite example and the comment in the
patch make clear what my thinking is.

This resolved both the issue with the large file reported as with the
new test suite file (lbzip2/32767.bz2). The whole testsuite passes now,
even under valgrind and with gcc -fsanitize=undefined.

Comments on the patch idea more than welcome.

Thanks,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: limit-nSelectors-processing.patch
Type: text/x-patch
Size: 1523 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/bzip2-devel/attachments/20190101/6860c5e1/attachment.bin>


More information about the Bzip2-devel mailing list