From: Alex Beregszaszi Date: Wed, 12 Oct 2005 22:40:10 +0000 (+0000) Subject: sanity check whether dimensions are non-null X-Git-Tag: v0.5~13525 X-Git-Url: https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=d10dc61682b057d6f3a59aa23353e4f155f16d11 sanity check whether dimensions are non-null Originally committed as revision 4634 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/imgresample.c b/libavcodec/imgresample.c index 53471f4510..d423f388cc 100644 --- a/libavcodec/imgresample.c +++ b/libavcodec/imgresample.c @@ -558,6 +558,9 @@ ImgReSampleContext *img_resample_full_init(int owidth, int oheight, { ImgReSampleContext *s; + if (!owidth || !oheight || !iwidth || !iheight) + return NULL; + s = av_mallocz(sizeof(ImgReSampleContext)); if (!s) return NULL;