summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg2000.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:16:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-06-03 14:16:19 +0200
commitd8c10324eda724b5a6e04477ed600dfb6804dd30 (patch)
tree2c5dae2e27bdc1b1256e761359a8f1e21e74f25c /libavcodec/jpeg2000.c
parent6952e2f82a8aaa8e0c378f82b518925179daa698 (diff)
downloadffmpeg-d8c10324eda724b5a6e04477ed600dfb6804dd30.tar.gz
jpeg2000: Fix Unintended sign extension in malloc arguments of cblk.
Fixes CID1026770 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/jpeg2000.c')
-rw-r--r--libavcodec/jpeg2000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index 26446cf308..c98b925394 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -420,7 +420,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
return AVERROR(ENOMEM);
prec->cblk = av_malloc_array(prec->nb_codeblocks_width *
- prec->nb_codeblocks_height,
+ (uint64_t)prec->nb_codeblocks_height,
sizeof(*prec->cblk));
if (!prec->cblk)
return AVERROR(ENOMEM);