diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 13:37:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-12 13:38:52 +0200 |
commit | 4caf8c51de93a55a3f3605c06fb0663486155c8d (patch) | |
tree | 0da872dcd900f78ac173aad039ab837fb443c17a | |
parent | a44d35d90ffa0cfc3eb8a8a8fc6c20ffec4e90fe (diff) | |
parent | b26742cc308552f242ee2bf93b07a3ff509f4edc (diff) | |
download | ffmpeg-4caf8c51de93a55a3f3605c06fb0663486155c8d.tar.gz |
Merge commit 'b26742cc308552f242ee2bf93b07a3ff509f4edc'
* commit 'b26742cc308552f242ee2bf93b07a3ff509f4edc':
shorten: Break out of loop looking for fmt chunk if none is found
See: 5e9a56a0350c518cd4b38845aff49d41a9c952ae
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/shorten.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 93959dc348..5cb21c541b 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -227,9 +227,11 @@ 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); - if (len<0 || bytestream2_get_bytes_left(&gb) - 8 < len) - return AVERROR_INVALIDDATA; bytestream2_skip(&gb, len); + if (len < 0 || 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); |