aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-27 01:09:59 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-29 01:02:55 +0200
commitfff010591b35874b4c7a7e9fe00d7541f0b7c994 (patch)
tree0f8e9086ce4b3cad62820316bf05ad006db25740
parent3d8754cd091d81ed8e39978618cb441ebbc69ea5 (diff)
downloadffmpeg-fff010591b35874b4c7a7e9fe00d7541f0b7c994.tar.gz
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>
-rw-r--r--libavcodec/jpeg2000dwt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c
index f2da7307c4..34e33553f7 100644
--- a/libavcodec/jpeg2000dwt.c
+++ b/libavcodec/jpeg2000dwt.c
@@ -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;
}