Commit 2773ab36 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeglsdec/ff_jpegls_decode_lse: check len field validity

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 020600ee
......@@ -52,11 +52,14 @@ int ff_jpegls_decode_lse(MJpegDecodeContext *s)
int id;
int tid, wt, maxtab, i, j;
int len = get_bits(&s->gb, 16); /* length: FIXME: verify field validity */
int len = get_bits(&s->gb, 16);
id = get_bits(&s->gb, 8);
switch (id) {
case 1:
if (len < 13)
return AVERROR_INVALIDDATA;
s->maxval = get_bits(&s->gb, 16);
s->t1 = get_bits(&s->gb, 16);
s->t2 = get_bits(&s->gb, 16);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment