Commit d695c0ee authored by diego's avatar diego

Fix memcpy out-of-bounds.

patch by Michel Bardiaux, mbardiaux mediaxim be


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7780 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1bbb83f9
...@@ -187,7 +187,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, ...@@ -187,7 +187,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
switch(depth){ switch(depth){
case 24: case 24:
for(i = 0; i < avctx->height; i++){ for(i = 0; i < avctx->height; i++){
memcpy(ptr, buf, n); memcpy(ptr, buf, avctx->width*(depth>>3));
buf += n; buf += n;
ptr += linesize; ptr += linesize;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment