Skip to content

Commit

Permalink
Reject invalid MAX_WBITS values at compile time.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Nov 9, 2024
1 parent 6d3a66a commit ef24c4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* To be used only when the state is known to be valid */

/* common constants */

#if MAX_WBITS < 9 || MAX_WBITS > 15
# error MAX_WBITS must be in 9..15
#endif
#ifndef DEF_WBITS
# define DEF_WBITS MAX_WBITS
#endif
Expand Down

0 comments on commit ef24c4c

Please sign in to comment.