mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
avcodec/indeo5: Fix infinite loop in skip_hdr_extension()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7f4dfbd080
commit
103f9c261a
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user