From: Michael Niedermayer Date: Wed, 28 May 2008 01:57:19 +0000 (+0000) Subject: Null pointer check / CID26. X-Git-Tag: v0.5~4443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=884d53855d2b13fcc9ceca4d91059e81cd83ad3d;p=platform%2Fupstream%2Flibav.git Null pointer check / CID26. Originally committed as revision 13488 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c index 6f1eb5d6e..d05d8f651 100644 --- a/libavformat/yuv4mpeg.c +++ b/libavformat/yuv4mpeg.c @@ -322,6 +322,8 @@ static int yuv4_read_header(AVFormatContext *s, AVFormatParameters *ap) } st = av_new_stream(s, 0); + if(!st) + return -1; st->codec->width = width; st->codec->height = height; av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);