[FFmpeg-devel] [PATCH] lavf/wavdec: add sanity check for AVCodecContext.channels

Michael Niedermayer michaelni at gmx.at
Tue Aug 19 01:31:44 CEST 2014


On Mon, Aug 18, 2014 at 07:44:39PM -0300, James Almer wrote:
> On 18/08/14 4:42 AM, Michael Niedermayer wrote:
> > On Mon, Aug 18, 2014 at 03:14:01AM -0300, James Almer wrote:
> >> Fixes ticket #3862.
> >> As a side effect, this also fixes aac_latm in wav.
> >>
> >> Signed-off-by: James Almer <jamrial at gmail.com>
> > 
> > applied
> > 
> > 
> >> ---
> >> Maybe a check for channels <= 0 should be also added to ff_get_wav_header()
> >> right after the sample_rate one?
> > 
> > sounds reasonable, would need to be tested though
> 
> It seems that according to the wav spec, "channels" can only have values from 1 to 
> UINT16_MAX, so a wav header where it's 0 means it's most assuredly broken.
> 
> Fate passes after adding a check to ff_get_wav_header(). Is there some other kind 
> of test that could be done?

probably not, one could test *.wav that one has locally to see if any
change

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140819/bace685d/attachment.asc>


More information about the ffmpeg-devel mailing list