1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/jpegxl_probe: Fix potential incorrect and UB shift

Fixes Coverity issue #1504273.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-04-28 05:07:25 +02:00
parent 5f8c83e95e
commit 3946cb02fc

View File

@ -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;
}
}