Skip to content
Snippets Groups Projects
Commit 4346a168 authored by Mark Adler's avatar Mark Adler
Browse files

Assure that the number of bits for deflatePrime() is valid.

parent 5c44459c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -589,7 +589,8 @@ int ZEXPORT deflatePrime (strm, bits, value)
 
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
s = strm->state;
if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
if (bits < 0 || bits > 16 ||
s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
return Z_BUF_ERROR;
do {
put = Buf_size - s->bi_valid;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment