summaryrefslogtreecommitdiff
path: root/libavcodec/lzwenc.c
diff options
context:
space:
mode:
authorDaniel Verkamp <daniel@drv.nu>2009-03-16 12:47:43 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2009-03-16 12:47:43 +0000
commit8127c4208ce486921270e52aed1970f0fe792dcc (patch)
tree0e2607f5df5327c3e4bba753f7cd0f3206b2b221 /libavcodec/lzwenc.c
parent6a2d3fc30be6ba28531d9b57952cd93223e7a6c8 (diff)
Fix an assert().
Patch by Daniel Verkamp daniel drv nu Originally committed as revision 18006 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lzwenc.c')
-rw-r--r--libavcodec/lzwenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lzwenc.c b/libavcodec/lzwenc.c
index d174acdf94..4565b22c64 100644
--- a/libavcodec/lzwenc.c
+++ b/libavcodec/lzwenc.c
@@ -203,7 +203,7 @@ void ff_lzw_encode_init(LZWEncodeState * s, uint8_t * outbuf, int outsize, int m
s->maxbits = maxbits;
init_put_bits(&s->pb, outbuf, outsize);
s->bufsize = outsize;
- assert(9 <= s->maxbits && s->maxbits <= s->maxbits);
+ assert(s->maxbits >= 9 && s->maxbits <= LZW_MAXBITS);
s->maxcode = 1 << s->maxbits;
s->output_bytes = 0;
s->last_code = LZW_PREFIX_EMPTY;