diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-16 12:48:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-16 12:50:16 +0100 |
commit | e2742d6ad69595fd2af36adf0883e37701307f52 (patch) | |
tree | 2ee884bf0f435bfda3efc4ce90a5b965e94b4aa8 /libavcodec/wmalosslessdec.c | |
parent | 4ecac816780dbb3d3297885856bde6e53a5f7708 (diff) | |
download | ffmpeg-e2742d6ad69595fd2af36adf0883e37701307f52.tar.gz |
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>
Diffstat (limited to 'libavcodec/wmalosslessdec.c')
-rw-r--r-- | libavcodec/wmalosslessdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 7a80248ffc..71d8aa3cea 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -348,11 +348,11 @@ static int decode_tilehdr(WmallDecodeCtx *s) if (num_samples[c] == min_channel_len) { if (fixed_channel_layout || channels_for_cur_subframe == 1 || (min_channel_len == s->samples_per_frame - s->min_samples_per_subframe)) { - contains_subframe[c] = in_use = 1; + contains_subframe[c] = 1; } else { - if (get_bits1(&s->gb)) - contains_subframe[c] = in_use = 1; + contains_subframe[c] = get_bits1(&s->gb); } + in_use |= contains_subframe[c]; } else contains_subframe[c] = 0; } |