Browse Source

Fix memcpy out-of-bounds.

patch by Michel Bardiaux, mbardiaux mediaxim be

Originally committed as revision 7780 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michel Bardiaux Diego Biurrun 19 years ago
parent
commit
e8f917d6fd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/bmp.c

+ 1
- 1
libavcodec/bmp.c View File

@@ -187,7 +187,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
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;
}


Loading…
Cancel
Save