Commit 7c51d79c authored by Vittorio Giovara's avatar Vittorio Giovara

nsvdec: validate channels and samplerate

Avoid a division by zero.

CC: libav-stable@libav.org
Bug-Id: CID 717749
parent a536a4e4
......@@ -620,6 +620,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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment