diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-22 23:56:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-23 00:03:49 +0200 |
commit | da317efd92561290952a8aa191f1e5ea498a27c4 (patch) | |
tree | 20f831ff9154c95909b118eb9bfc92554f712a87 /libavcodec/j2k.c | |
parent | 45ae9a8fc903d5b5041a5d34015aa98ab2bc12be (diff) | |
download | ffmpeg-da317efd92561290952a8aa191f1e5ea498a27c4.tar.gz |
j2k: reorder multiplications to avoid interger overflows related to precincts
Fixes CID703778, CID703777
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/j2k.c')
-rw-r--r-- | libavcodec/j2k.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/j2k.c b/libavcodec/j2k.c index 196d7fddcd..f5b40b1b32 100644 --- a/libavcodec/j2k.c +++ b/libavcodec/j2k.c @@ -288,7 +288,7 @@ int ff_j2k_init_component(J2kComponent *comp, J2kCodingStyle *codsty, J2kQuantSt band->cblk = av_malloc(sizeof(J2kCblk) * band->cblknx * band->cblkny); if (!band->cblk) return AVERROR(ENOMEM); - band->prec = av_malloc(reslevel->num_precincts_x * reslevel->num_precincts_y * sizeof(J2kPrec)); + band->prec = av_malloc(sizeof(J2kCblk) * reslevel->num_precincts_x * reslevel->num_precincts_y); if (!band->prec) return AVERROR(ENOMEM); |