[Ffmpeg-cvslog] r7780 - trunk/libavcodec/bmp.c

diego subversion
Wed Jan 31 12:19:49 CET 2007


Author: diego
Date: Wed Jan 31 12:19:48 2007
New Revision: 7780

Modified:
   trunk/libavcodec/bmp.c

Log:
Fix memcpy out-of-bounds.
patch by Michel Bardiaux, mbardiaux mediaxim be


Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c	(original)
+++ trunk/libavcodec/bmp.c	Wed Jan 31 12:19:48 2007
@@ -187,7 +187,7 @@
     switch(depth){
     case 24:
         for(i = 0; i < avctx->height; i++){
-            memcpy(ptr, buf, n);
+            memcpy(ptr, buf, avctx->width*(depth>>3));
             buf += n;
             ptr += linesize;
         }




More information about the ffmpeg-cvslog mailing list