diff options
Diffstat (limited to 'deflate.c')
-rw-r--r-- | deflate.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -589,7 +589,8 @@ int ZEXPORT deflatePrime (strm, bits, value) | |||
589 | 589 | ||
590 | if (deflateStateCheck(strm)) return Z_STREAM_ERROR; | 590 | if (deflateStateCheck(strm)) return Z_STREAM_ERROR; |
591 | s = strm->state; | 591 | s = strm->state; |
592 | if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) | 592 | if (bits < 0 || bits > 16 || |
593 | s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) | ||
593 | return Z_BUF_ERROR; | 594 | return Z_BUF_ERROR; |
594 | do { | 595 | do { |
595 | put = Buf_size - s->bi_valid; | 596 | put = Buf_size - s->bi_valid; |