aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2005-10-12 22:40:10 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2005-10-12 22:40:10 +0000
commitd10dc61682b057d6f3a59aa23353e4f155f16d11 (patch)
tree0ea2ddde16f3138ee456a0140fc26ad4aa181a3e
parent83254e245cfc3dedf6821d4bb7f4dc2b60c7438f (diff)
downloadffmpeg-d10dc61682b057d6f3a59aa23353e4f155f16d11.tar.gz
sanity check whether dimensions are non-null
Originally committed as revision 4634 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/imgresample.c3
1 files changed, 3 insertions, 0 deletions
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;