diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2005-10-12 22:40:10 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2005-10-12 22:40:10 +0000 |
commit | d10dc61682b057d6f3a59aa23353e4f155f16d11 (patch) | |
tree | 0ea2ddde16f3138ee456a0140fc26ad4aa181a3e | |
parent | 83254e245cfc3dedf6821d4bb7f4dc2b60c7438f (diff) | |
download | ffmpeg-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.c | 3 |
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; |