aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-10 17:50:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-10 17:52:24 +0100
commit151067bbc2200e3130eb9e4bab242dfd8db78761 (patch)
tree2ae77b717071b1c2a63aa82fbeda6cf5fda61ccf
parentd24de4596c3f980c9cc1cb5c8706c8411e46275b (diff)
downloadffmpeg-151067bbc2200e3130eb9e4bab242dfd8db78761.tar.gz
dpx: Fix rounding in 10bit total_size calculation
This could have caused out of array reads Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dpx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 92c0e4b8d1..0237b44784 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -159,7 +159,7 @@ static int decode_frame(AVCodecContext *avctx,
return -1;
}
avctx->pix_fmt = AV_PIX_FMT_GBRP10;
- total_size = (4 * avctx->width * avctx->height * elements) / 3;
+ total_size = (avctx->width * avctx->height * elements + 2) / 3 * 4;
break;
case 12:
if (!packing) {