[FFmpeg-cvslog] r26258 - trunk/libavcodec/cljr.c

Jason Garrett-Glaser jason
Fri Jan 7 22:58:27 CET 2011


On Fri, Jan 7, 2011 at 4:54 PM, cehoyos <subversion at mplayerhq.hu> wrote:
> Author: cehoyos
> Date: Fri Jan ?7 22:54:52 2011
> New Revision: 26258
>
> Log:
> Check if buffer is large enough for given resolution.
> Fixes issue 2051.
>
> Patch by Daniel Kang, daniel.d.kang at gmail
>
> Modified:
> ? trunk/libavcodec/cljr.c
>
> Modified: trunk/libavcodec/cljr.c
> ==============================================================================
> --- trunk/libavcodec/cljr.c ? ? Fri Jan ?7 20:56:31 2011 ? ? ? ?(r26257)
> +++ trunk/libavcodec/cljr.c ? ? Fri Jan ?7 22:54:52 2011 ? ? ? ?(r26258)
> @@ -54,6 +54,11 @@ static int decode_frame(AVCodecContext *
> ? ? if(p->data[0])
> ? ? ? ? avctx->release_buffer(avctx, p);
>
> + ? ?if(buf_size/avctx->height < avctx->width) {
> + ? ? ? ?av_log(avctx, AV_LOG_ERROR, "Resolution larger than buffer size. Invalid header?\n");
> + ? ? ? ?return -1;
> + ? ?}
> +
> ? ? p->reference= 0;
> ? ? if(avctx->get_buffer(avctx, p) < 0){
> ? ? ? ? av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");

Isn't that issue 2501?

Jason



More information about the ffmpeg-cvslog mailing list