diff imgresample.c @ 2904:84404858c529 libavcodec

sanity check whether dimensions are non-null
author alex
date Wed, 12 Oct 2005 22:40:10 +0000
parents 40765c51a7a9
children ef2149182f1c
line wrap: on
line diff
--- a/imgresample.c	Wed Oct 12 22:37:42 2005 +0000
+++ b/imgresample.c	Wed Oct 12 22:40:10 2005 +0000
@@ -558,6 +558,9 @@
 {
     ImgReSampleContext *s;
 
+    if (!owidth || !oheight || !iwidth || !iheight)
+	return NULL;
+
     s = av_mallocz(sizeof(ImgReSampleContext));
     if (!s)
         return NULL;