提交 7c51d79c 编写于 作者: V Vittorio Giovara

nsvdec: validate channels and samplerate

Avoid a division by zero.

CC: libav-stable@libav.org
Bug-Id: CID 717749
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册