Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-07-16 22:17:52 +0400
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-07-23 01:46:26 +0400
commit5ab855777de94ba616a9c42fbd0f2947f95deb89 (patch)
tree7171f67e88a92e6e339c27effea0439f57071370 /libavformat/wav.c
parent4f4eb380f0f96dbb7cdd2b812fa92b8b47a0f27c (diff)
wav: Add check for 'fmt' tag in SMV code
If there is a 'SMV0' tag, but no 'fmt' tag, it is possible that 'st' got used as NULL. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/wav.c')
-rw-r--r--libavformat/wav.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c
index c408623f36..928f82d1e1 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -480,6 +480,10 @@ static int wav_read_header(AVFormatContext *s)
return ret;
break;
case MKTAG('S','M','V','0'):
+ if (!got_fmt) {
+ av_log(s, AV_LOG_ERROR, "found no 'fmt ' tag before the 'SMV0' tag\n");
+ return AVERROR_INVALIDDATA;
+ }
// SMV file, a wav file with video appended.
if (size != MKTAG('0','2','0','0')) {
av_log(s, AV_LOG_ERROR, "Unknown SMV version found\n");