Commit 103f9c26 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/indeo5: Fix infinite loop in skip_hdr_extension()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7f4dfbd0
......@@ -289,14 +289,18 @@ static int decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx)
*
* @param[in,out] gb the GetBit context
*/
static inline void skip_hdr_extension(GetBitContext *gb)
static inline int skip_hdr_extension(GetBitContext *gb)
{
int i, len;
do {
len = get_bits(gb, 8);
if (8*len > get_bits_left(gb))
return AVERROR_INVALIDDATA;
for (i = 0; i < len; i++) skip_bits(gb, 8);
} while(len);
return 0;
}
......
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