aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichel Bardiaux <mbardiaux@peaktime.be>2007-01-31 11:19:48 +0000
committerDiego Biurrun <diego@biurrun.de>2007-01-31 11:19:48 +0000
commite8f917d6fd9f42fa4f36fd6dd8a21c1e31cd1c26 (patch)
treeab104e9d559b2e019dd0da18b0eaa486e4c5c787 /libavcodec
parent960e48f8f061f4a947fceb2ba52dd84a84fb271d (diff)
downloadffmpeg-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.c2
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;
}