# HG changeset patch # User nicodvb # Date 1169298849 0 # Node ID 58d083ace2f261f06d174f9dcfac88d7ad1cff42 # Parent bd3c871c93d0bd2e182edc0ff4914fd89f717f6e vc1 probing code: if sh_video->bih can't be callocated exit diff -r bd3c871c93d0 -r 58d083ace2f2 libmpdemux/video.c --- a/libmpdemux/video.c Sat Jan 20 13:10:40 2007 +0000 +++ b/libmpdemux/video.c Sat Jan 20 13:14:09 2007 +0000 @@ -401,6 +401,10 @@ 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;