summaryrefslogtreecommitdiff
path: root/libavcodec/bmp.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-10-30 20:43:07 +0000
committerMåns Rullgård <mans@mansr.com>2006-10-30 20:43:07 +0000
commit743311a1b080fd015edd69c0e4d6a3db3c584954 (patch)
tree04b6cc36d126dea0b6b0a7ea3bc854241d28cac1 /libavcodec/bmp.c
parent2959ba80c2fef745408ed7612a57a617c1468334 (diff)
coded line size is a multiple of 4
Originally committed as revision 6844 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bmp.c')
-rw-r--r--libavcodec/bmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 3034f9b8d3..2a4d83393e 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -177,7 +177,8 @@ static int bmp_decode_frame(AVCodecContext *avctx,
buf += hsize;
dsize = buf_size - hsize;
- n = avctx->width * (depth / 8);
+ /* Line size in file multiple of 4 */
+ n = (avctx->width * (depth / 8) + 3) & ~3;
if(n * avctx->height > dsize){
av_log(avctx, AV_LOG_ERROR, "not enough data (%d < %d)\n",