Browse Source

Merge commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6'

* commit '7c51d79ca7badfb370c410b8f44c9142b938e2e6':
  nsvdec: validate channels and samplerate

See: d633e15d7d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.6
Michael Niedermayer 10 years ago
parent
commit
b04cbbe255
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/nsvdec.c

+ 2
- 0
libavformat/nsvdec.c View File

@@ -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) {


Loading…
Cancel
Save