mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-25 04:30:02 +00:00
j2k: reorder multiplications to avoid interger overflows related to precincts
Fixes CID703778, CID703777 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
45ae9a8fc9
commit
da317efd92
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user