changeset 4445:fc9a42d0e848 libavcodec

Fix memcpy out-of-bounds. patch by Michel Bardiaux, mbardiaux mediaxim be
author diego
date Wed, 31 Jan 2007 11:19:48 +0000
parents 73b81d87c846
children b8b844ae5937
files bmp.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bmp.c	Wed Jan 31 10:48:08 2007 +0000
+++ b/bmp.c	Wed Jan 31 11:19:48 2007 +0000
@@ -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;
         }