mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
nsvdec: validate channels and samplerate
Avoid a division by zero. CC: libav-stable@libav.org Bug-Id: CID 717749
This commit is contained in:
parent
a536a4e4bc
commit
7c51d79ca7
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user