diff options
-rw-r--r-- | libavformat/nsvdec.c | 2 |
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) { |