[FFmpeg-cvslog] r23080 - trunk/libavcodec/iff.c

rbultje subversion
Mon May 10 19:00:56 CEST 2010


Author: rbultje
Date: Mon May 10 19:00:56 2010
New Revision: 23080

Log:
Ensure that width and height are > 0. avcodec_open() itself only checks that
they are >= 0.

Patch by Sebastian Vater <cdgs basty googlemail com>.

Modified:
   trunk/libavcodec/iff.c

Modified: trunk/libavcodec/iff.c
==============================================================================
--- trunk/libavcodec/iff.c	Mon May 10 11:32:59 2010	(r23079)
+++ trunk/libavcodec/iff.c	Mon May 10 19:00:56 2010	(r23080)
@@ -115,6 +115,8 @@ static av_cold int decode_init(AVCodecCo
         return AVERROR_INVALIDDATA;
     }
 
+    if ((err = avcodec_check_dimensions(avctx, avctx->width, avctx->height)))
+        return err;
     s->planesize = FFALIGN(avctx->width, 16) >> 3; // Align plane size in bits to word-boundary
     s->planebuf = av_malloc(s->planesize + FF_INPUT_BUFFER_PADDING_SIZE);
     if (!s->planebuf)



More information about the ffmpeg-cvslog mailing list