diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-28 05:07:25 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-29 01:30:14 +0200 |
commit | 3946cb02fc67a0fdd23ff9e0678b2801fe479463 (patch) | |
tree | 152a1d3e75b59baebc56361fb7021b72b09e0e0a /libavformat/jpegxl_probe.c | |
parent | 5f8c83e95e4b871d1073c07233903cd4669949b7 (diff) |
avformat/jpegxl_probe: Fix potential incorrect and UB shift
Fixes Coverity issue #1504273.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/jpegxl_probe.c')
-rw-r--r-- | libavformat/jpegxl_probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/jpegxl_probe.c b/libavformat/jpegxl_probe.c index 924b529ad5..9cd00da194 100644 --- a/libavformat/jpegxl_probe.c +++ b/libavformat/jpegxl_probe.c @@ -96,10 +96,10 @@ static uint64_t jpegxl_u64(GetBitContext *gb) ret = jxl_bits(12); while (jxl_bits(1)) { if (shift < 60) { - ret |= jxl_bits(8) << shift; + ret |= (uint64_t)jxl_bits(8) << shift; shift += 8; } else { - ret |= jxl_bits(4) << shift; + ret |= (uint64_t)jxl_bits(4) << shift; break; } } |