Commit e9e642cb authored by Michael Niedermayer's avatar Michael Niedermayer

indeo3: Check remaining bits in parse_bintree()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a7cfef29
...@@ -736,7 +736,7 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, ...@@ -736,7 +736,7 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
ref_cell->width -= curr_cell.width; ref_cell->width -= curr_cell.width;
} }
while (1) { /* loop until return */ while (get_bits_left(&ctx->gb) >= 2) { /* loop until return */
RESYNC_BITSTREAM; RESYNC_BITSTREAM;
switch (code = get_bits(&ctx->gb, 2)) { switch (code = get_bits(&ctx->gb, 2)) {
case H_SPLIT: case H_SPLIT:
...@@ -789,7 +789,7 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx, ...@@ -789,7 +789,7 @@ static int parse_bintree(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
} }
}//while }//while
return 0; return AVERROR_INVALIDDATA;
} }
......
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