diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2024-11-08 19:37:34 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2024-11-08 19:37:34 -0800 |
commit | ef24c4c7502169f016dcd2a26923dbaf3216748c (patch) | |
tree | 356be230043e205bdc7757c0c72f02580f6a10d7 /zutil.h | |
parent | 6d3a66a11a9d98c80d5b6a36d489263a389c6b90 (diff) | |
download | zlib-ef24c4c7502169f016dcd2a26923dbaf3216748c.tar.gz zlib-ef24c4c7502169f016dcd2a26923dbaf3216748c.tar.bz2 zlib-ef24c4c7502169f016dcd2a26923dbaf3216748c.zip |
Reject invalid MAX_WBITS values at compile time.
Diffstat (limited to 'zutil.h')
-rw-r--r-- | zutil.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -65,7 +65,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
65 | /* To be used only when the state is known to be valid */ | 65 | /* To be used only when the state is known to be valid */ |
66 | 66 | ||
67 | /* common constants */ | 67 | /* common constants */ |
68 | 68 | #if MAX_WBITS < 9 || MAX_WBITS > 15 | |
69 | # error MAX_WBITS must be in 9..15 | ||
70 | #endif | ||
69 | #ifndef DEF_WBITS | 71 | #ifndef DEF_WBITS |
70 | # define DEF_WBITS MAX_WBITS | 72 | # define DEF_WBITS MAX_WBITS |
71 | #endif | 73 | #endif |