On Wed, May 22, 2013 at 02:13:07PM +0200, Luca Barbato wrote:
> ---
>  libavcodec/wavpack.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
> index cfcd22d..1c29b07 100644
> --- a/libavcodec/wavpack.c
> +++ b/libavcodec/wavpack.c
> @@ -1203,6 +1203,9 @@ static int wavpack_decode_frame(AVCodecContext *avctx, 
> void *data,
>      int frame_size, ret, frame_flags;
>      int samplecount = 0;
>  
> +    if (avpkt->size < 8 + (s->multichannel || s->mkv_mode) * 4)
> +        return AVERROR_INVALIDDATA;
> +
>      s->block     = 0;
>      s->ch_offset = 0;
>  
> -- 

For .WV demuxer it's 12 + 4*multichannel, for MKV it seems to be the same
(http://matroska.org/technical/specs/codecid/wavpack.html)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to