History

avcodec/alsdec: Clear shift_value

(the exact issue is unreproducable but the use of uninitialized data is reproducable) Should fix: signed integer overflow: -2147483648 - 127 cannot be represented in type 'int' Should fix: 69881/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-4751301204836352

Michael Niedermayer committed 2 years ago

Commit 6194cb81 parent 5d9544c1 file · +2 −2Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/alsdec.c+2−2
@@ -2110,8 +2110,8 @@ static av_cold int decode_init(AVCodecContext *avctx) · 2109 unmodified lines
21102110
21112111 if (sconf->floating) {
21122112 ctx->acf = av_malloc_array(channels, sizeof(*ctx->acf));
2113− ctx->shift_value = av_malloc_array(channels, sizeof(*ctx->shift_value));
2114− ctx->last_shift_value = av_malloc_array(channels, sizeof(*ctx->last_shift_value));
2113+ ctx->shift_value = av_calloc(channels, sizeof(*ctx->shift_value));
2114+ ctx->last_shift_value = av_calloc(channels, sizeof(*ctx->last_shift_value));
21152115 ctx->last_acf_mantissa = av_malloc_array(channels, sizeof(*ctx->last_acf_mantissa));
21162116 ctx->raw_mantissa = av_calloc(channels, sizeof(*ctx->raw_mantissa));
21172117

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t