avcodec/jpeg2000dwt: Fix left shift of negative number

Fixes the j2k-dwt FATE-test; also fixes #9945.
(I don't know whether the multiplication can overflow.)

Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-09-27 01:09:59 +02:00
parent 3d8754cd09
commit fff010591b

View File

@ -81,7 +81,7 @@ static void sd_1d53(int *p, int i0, int i1)
if (i1 <= i0 + 1) {
if (i0 == 1)
p[1] <<= 1;
p[1] *= 2;
return;
}