shorten: Break out of loop looking for fmt chunk if none is found
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit b26742cc30
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:

committed by
Luca Barbato

parent
8484351749
commit
d411f07751
@@ -225,6 +225,10 @@ static int decode_wave_header(AVCodecContext *avctx, const uint8_t *header,
|
||||
while (bytestream2_get_le32(&gb) != MKTAG('f', 'm', 't', ' ')) {
|
||||
len = bytestream2_get_le32(&gb);
|
||||
bytestream2_skip(&gb, len);
|
||||
if (bytestream2_get_bytes_left(&gb) < 16) {
|
||||
av_log(avctx, AV_LOG_ERROR, "no fmt chunk found\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
len = bytestream2_get_le32(&gb);
|
||||
|
||||
|
Reference in New Issue
Block a user