diff options
author | Michel Bardiaux <mbardiaux@peaktime.be> | 2007-01-31 11:19:48 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2007-01-31 11:19:48 +0000 |
commit | e8f917d6fd9f42fa4f36fd6dd8a21c1e31cd1c26 (patch) | |
tree | ab104e9d559b2e019dd0da18b0eaa486e4c5c787 /libavcodec | |
parent | 960e48f8f061f4a947fceb2ba52dd84a84fb271d (diff) | |
download | ffmpeg-e8f917d6fd9f42fa4f36fd6dd8a21c1e31cd1c26.tar.gz |
Fix memcpy out-of-bounds.
patch by Michel Bardiaux, mbardiaux mediaxim be
Originally committed as revision 7780 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 20cca16ac7..30eee65185 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -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; } |