changeset 19277:3f910f7b0e53

Fix bogus pointer addition in the extraction of extradata from BITMAPINFOHEADER.
author pacman
date Mon, 31 Jul 2006 22:19:48 +0000
parents 6fae24d40138
children c41d4672c675
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Mon Jul 31 20:32:38 2006 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Mon Jul 31 22:19:48 2006 +0000
@@ -274,8 +274,7 @@
 	avctx->flags |= CODEC_FLAG_EXTERN_HUFF;
 	avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER);
 	avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
-	memcpy(avctx->extradata, sh->bih+sizeof(BITMAPINFOHEADER),
-	    avctx->extradata_size);
+	memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
 
 #if 0
 	{