diff options
| author | Mark Adler <git@madler.net> | 2026-03-09 10:12:38 -0700 |
|---|---|---|
| committer | Mark Adler <git@madler.net> | 2026-03-09 10:12:38 -0700 |
| commit | 63a623cb69cca9c562cce651c578ad4160c2cf00 (patch) | |
| tree | 6c1d9b8adb0f8eb6c6271e7f75dd1c59faf9f276 | |
| parent | 09a1572aa624e5ddb6c075dc013880de70b1b9b9 (diff) | |
| download | zlib-63a623cb69cca9c562cce651c578ad4160c2cf00.tar.gz zlib-63a623cb69cca9c562cce651c578ad4160c2cf00.tar.bz2 zlib-63a623cb69cca9c562cce651c578ad4160c2cf00.zip | |
Correct ENOUGH_LENS and ENOUGH_DIST for PKZIP_BUG_WORKAROUND.
Those were not quite enough if the workaround was enabled.
| -rw-r--r-- | inftrees.h | 10 |
1 files changed, 8 insertions, 2 deletions
| @@ -46,8 +46,14 @@ typedef struct { | |||
| 46 | inflate_table() calls in inflate.c and infback.c. If the root table size is | 46 | inflate_table() calls in inflate.c and infback.c. If the root table size is |
| 47 | changed, then these maximum sizes would be need to be recalculated and | 47 | changed, then these maximum sizes would be need to be recalculated and |
| 48 | updated. */ | 48 | updated. */ |
| 49 | #define ENOUGH_LENS 852 | 49 | #ifndef PKZIP_BUG_WORKAROUND |
| 50 | #define ENOUGH_DISTS 592 | 50 | # define ENOUGH_LENS 852 |
| 51 | # define ENOUGH_DISTS 592 | ||
| 52 | #else | ||
| 53 | /* That workaround permits 288 literal/length codes and 32 distance codes. */ | ||
| 54 | # define ENOUGH_LENS 854 | ||
| 55 | # define ENOUGH_DISTS 594 | ||
| 56 | #endif | ||
| 51 | #define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) | 57 | #define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) |
| 52 | 58 | ||
| 53 | /* Type of code to build for inflate_table() */ | 59 | /* Type of code to build for inflate_table() */ |
