mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avcodec/wmalosslessdec: completely initialize contains_subframe
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f60c46325d7_6415_luckynight.wma Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4ecac81678
commit
e2742d6ad6
@ -348,11 +348,11 @@ static int decode_tilehdr(WmallDecodeCtx *s)
|
|||||||
if (num_samples[c] == min_channel_len) {
|
if (num_samples[c] == min_channel_len) {
|
||||||
if (fixed_channel_layout || channels_for_cur_subframe == 1 ||
|
if (fixed_channel_layout || channels_for_cur_subframe == 1 ||
|
||||||
(min_channel_len == s->samples_per_frame - s->min_samples_per_subframe)) {
|
(min_channel_len == s->samples_per_frame - s->min_samples_per_subframe)) {
|
||||||
contains_subframe[c] = in_use = 1;
|
contains_subframe[c] = 1;
|
||||||
} else {
|
} else {
|
||||||
if (get_bits1(&s->gb))
|
contains_subframe[c] = get_bits1(&s->gb);
|
||||||
contains_subframe[c] = in_use = 1;
|
|
||||||
}
|
}
|
||||||
|
in_use |= contains_subframe[c];
|
||||||
} else
|
} else
|
||||||
contains_subframe[c] = 0;
|
contains_subframe[c] = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user