Commit f7068bf2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/alac: Clear pointers in allocate_buffers()

Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b5136612
......@@ -534,6 +534,12 @@ static int allocate_buffers(ALACContext *alac)
int ch;
int buf_size = alac->max_samples_per_frame * sizeof(int32_t);
for (ch = 0; ch < 2; ch++) {
alac->predict_error_buffer[ch] = NULL;
alac->output_samples_buffer[ch] = NULL;
alac->extra_bits_buffer[ch] = NULL;
}
for (ch = 0; ch < FFMIN(alac->channels, 2); ch++) {
FF_ALLOC_OR_GOTO(alac->avctx, alac->predict_error_buffer[ch],
buf_size, buf_alloc_fail);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment