1
0
mirror of https://gitlab.com/bzip2/bzip2.git synced 2025-08-09 13:22:45 +03:00
Commit Graph

12 Commits

Author SHA1 Message Date
Micah Snyder
7b44372099 Project version 1.1.0, libtool version 1:9:0
Increase the project version to 1.1.0 as this is a new feature version.

As for all new feature versions, increase the libtool .so version.
Only increase the revision, as no API's were added or removed.
It may look like I've increased it by 2, but that's because v1.0.8 used
Makefiles and was at 1:8:0.

See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
2022-01-30 11:50:37 -08:00
Micah Snyder
99459efa0b Code format housekeeping
There are a bunch of mixed tabs and spaces that are distracting when
reading the code. Just tidying up...
2021-06-01 09:37:23 -07:00
Mark Wielaard
812a898b76 Accept as many selectors as the file format allows.
But ignore any larger than the theoretical maximum, BZ_MAX_SELECTORS.

The theoretical maximum number of selectors depends on the maximum
blocksize (900000 bytes) and the number of symbols (50) that can be
encoded with a different Huffman tree. BZ_MAX_SELECTORS is 18002.

But the bzip2 file format allows the number of selectors to be encoded
with 15 bits (because 18002 isn't a factor of 2 and doesn't fit in
14 bits). So the file format maximum is 32767 selectors.

Some bzip2 encoders might actually have written out more selectors
than the theoretical maximum because they rounded up the number of
selectors to some convenient factor of 8.

The extra 14766 selectors can never be validly used by the decompression
algorithm. So we can read them, but then discard them.

This is effectively what was done (by accident) before we added a
check for nSelectors to be at most BZ_MAX_SELECTORS to mitigate
CVE-2019-12900.

The extra selectors were written out after the array inside the
EState struct. But the struct has extra space allocated after the
selector arrays of 18060 bytes (which is larger than 14766).
All of which will be initialized later (so the overwrite of that
space with extra selector values would have been harmless).
2019-07-10 14:39:32 -05:00
Mark Wielaard
5b923861db Change Julian's email address to jseward@acm.org 2019-03-30 22:56:16 +01:00
Julian Seward
962d60610c bzip2-1.0.6 2010-09-06 22:13:13 +02:00
Julian Seward
a1d78c5501 bzip2-1.0.5 2007-12-10 22:13:13 +01:00
Julian Seward
f10a33538e bzip2-1.0.4 2006-12-20 22:13:13 +01:00
Julian Seward
4d540bfc95 bzip2-1.0.3 2005-02-15 22:13:13 +01:00
Julian Seward
099d844292 bzip2-1.0.2 2001-12-30 22:13:13 +01:00
Julian Seward
795b859eee bzip2-1.0.1 2000-06-24 22:13:13 +02:00
Julian Seward
f93cd82a9a bzip2-0.9.5d 1999-09-04 22:13:13 +02:00
Julian Seward
977101ad5f bzip2-0.9.0c 1998-08-23 22:13:13 +02:00