[SCM] libav/experimental: Return AVERROR(EINVAL) when invalid width and/or height are specified to avcodec_open.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:04:11 UTC 2013


The following commit has been merged in the experimental branch:
commit 7868349a9159a5e6c4cc1c1daa0a8873b6360a74
Author: Panagiotis Issaris <takis.issaris at uhasselt.be>
Date:   Fri Jul 20 15:09:10 2007 +0000

    Return AVERROR(EINVAL) when invalid width and/or height are specified to
    avcodec_open.
    
    Originally committed as revision 9770 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cd7bc1c..fd757fd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -847,6 +847,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec)
 
     if((avctx->coded_width||avctx->coded_height) && avcodec_check_dimensions(avctx,avctx->coded_width,avctx->coded_height)){
         av_freep(&avctx->priv_data);
+        ret = AVERROR(EINVAL);
         goto end;
     }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list