changeset 2904:84404858c529 libavcodec

sanity check whether dimensions are non-null
author alex
date Wed, 12 Oct 2005 22:40:10 +0000
parents 59af72b453e3
children 926ea374947f
files imgresample.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;