Benjamin Larsson <ba...@ludd.ltu.se> added the comment:

On 01/07/2011 01:59 PM, Daniel Kang wrote:
> 
> New submission from Daniel Kang <daniel.d.k...@gmail.com>:
> 
> For ts files with invalid headers (i.e. channels greater than
> DCA_PRIM_CHANNELS_MAX), ffmpeg crashes with a buffer overread. The patch
> attached adds a check for this.
> 

Ok, seems like dts streams doesn't use the crc very much. It's basically
useless to rely on.

Anyway the problem is that the channel count changes mid stream. So what
is need to be done then is that first verify that the channels are in
the correct range. The current patch does that. And then only set
avctx->channels once. But don't rely on checking avctx->channels but add
a private context variable so the decoder for sure sets the value
instead of possibly the container.

MvH
Benjamin Larsson

________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2505>
________________________________________________

Reply via email to