[FFmpeg-devel] [PATCH 09/10] avcodec/alsdec: Use FFABSU()
Michael Niedermayer
michael at niedermayer.cc
Thu Jul 3 23:12:51 EEST 2025
Maybe fixes undefined -x80000000 (no doesnt replicate)
Fixes: 70869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5476567461986304
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/alsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 734eec8bf87..0d2fc36d81a 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1552,7 +1552,7 @@ static int read_diff_float_data(ALSDecContext *ctx, unsigned int ra_frame) {
if (ctx->raw_samples[c][i] != 0) {
//The following logic is taken from Tabel 14.45 and 14.46 from the ISO spec
if (av_cmp_sf_ieee754(acf[c], FLOAT_1)) {
- nbits[i] = 23 - av_log2(abs(ctx->raw_samples[c][i]));
+ nbits[i] = 23 - av_log2(FFABSU(ctx->raw_samples[c][i]));
} else {
nbits[i] = 23;
}
--
2.49.0
More information about the ffmpeg-devel
mailing list