jpeg2000: Fix Unintended sign extension in malloc arguments of cblk.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 3 Jun 2013 12:16:19 +0000 (14:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 3 Jun 2013 12:16:19 +0000 (14:16 +0200)
Fixes CID1026770
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/jpeg2000.c

index 26446cf..c98b925 100644 (file)
@@ -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);