From 6d708c31b6f8f7884681c229d269b89f083a9af6 Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sat, 20 Jan 2007 13:14:09 +0000 Subject: vc1 probing code: if sh_video->bih can't be callocated exit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21970 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/video.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libmpdemux') diff --git a/libmpdemux/video.c b/libmpdemux/video.c index ea770e26fb..6ff8210564 100644 --- a/libmpdemux/video.c +++ b/libmpdemux/video.c @@ -401,6 +401,10 @@ mpeg_header_parser: if(mp_vc1_decode_sequence_header(&picture, &videobuffer[4], videobuf_len-4)) { sh_video->bih = (BITMAPINFOHEADER *) calloc(1, sizeof(BITMAPINFOHEADER) + videobuf_len); + if(sh_video->bih == NULL) { + mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Couldn't alloc %d bytes for VC-1 extradata!\n", sizeof(BITMAPINFOHEADER) + videobuf_len); + return 0; + } sh_video->bih->biSize= sizeof(BITMAPINFOHEADER) + videobuf_len; memcpy(sh_video->bih + 1, videobuffer, videobuf_len); sh_video->bih->biCompression = sh_video->format; -- cgit v1.2.3