avcodec/dovi_rpu: Use 64 bit in get_us/se_coeff()

Fixes: shift exponent 32 is too large for 32-bit type 'int'
Fixes: 63151/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5067531154751488

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2817efbba3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-10-20 23:50:07 +02:00
parent e825157874
commit 66caaeec13
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, const AVDOVIRpuDataHeader
case RPU_COEFF_FLOAT:
fpart.u32 = get_bits_long(gb, 32);
return fpart.f32 * (1 << hdr->coef_log2_denom);
return fpart.f32 * (1LL << hdr->coef_log2_denom);
}
return 0; /* unreachable */
@ -176,7 +176,7 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader *
case RPU_COEFF_FLOAT:
fpart.u32 = get_bits_long(gb, 32);
return fpart.f32 * (1 << hdr->coef_log2_denom);
return fpart.f32 * (1LL << hdr->coef_log2_denom);
}
return 0; /* unreachable */