aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-27 19:53:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-27 19:53:50 +0100
commitb04cbbe25555e5026bbe9cdc5f13ceaeeee3e535 (patch)
treee3eeb5f3d34fedc0309a69c0437f0f949ffe9fe8
parent4ce67c961c0ff25580c922b6b1906012b8bcb329 (diff)
parent7c51d79ca7badfb370c410b8f44c9142b938e2e6 (diff)
downloadffmpeg-b04cbbe25555e5026bbe9cdc5f13ceaeeee3e535.tar.gz
Merge commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6'
* commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6': nsvdec: validate channels and samplerate See: d633e15d7d939f532326e2bc92097b12eba4d5ae Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/nsvdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index f3a26c6049..531e2732a7 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -621,6 +621,8 @@ null_chunk_retry:
bps = avio_r8(pb);
channels = avio_r8(pb);
samplerate = avio_rl16(pb);
+ if (!channels || !samplerate)
+ return AVERROR_INVALIDDATA;
asize-=4;
av_dlog(s, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
if (fill_header) {