Skip to content
Snippets Groups Projects
Commit e8f917d6 authored by Michel Bardiaux's avatar Michel Bardiaux Committed by Diego Biurrun
Browse files

Fix memcpy out-of-bounds.

patch by Michel Bardiaux, mbardiaux mediaxim be

Originally committed as revision 7780 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 960e48f8
No related branches found
No related tags found
No related merge requests found
...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment