You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
wma: don't return 0 on invalid packets.
Return 0 means "please return the same data again", i.e. it causes an infinite loop. Instead, return an error. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
@@ -817,8 +817,12 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
|
||||
s->last_superframe_len = 0;
|
||||
return 0;
|
||||
}
|
||||
if (buf_size < s->block_align)
|
||||
return 0;
|
||||
if (buf_size < s->block_align) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Input packet size too small (%d < %d)\n",
|
||||
buf_size, s->block_align);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
buf_size = s->block_align;
|
||||
|
||||
init_get_bits(&s->gb, buf, buf_size*8);
|
||||
|
Reference in New Issue
Block a user