Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-10 20:50:56 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-02-10 20:52:24 +0400
commit151067bbc2200e3130eb9e4bab242dfd8db78761 (patch)
tree2ae77b717071b1c2a63aa82fbeda6cf5fda61ccf /libavcodec/dpx.c
parentd24de4596c3f980c9cc1cb5c8706c8411e46275b (diff)
dpx: Fix rounding in 10bit total_size calculation
This could have caused out of array reads Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dpx.c')
-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) {