Commit cc038022 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()

Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 69716036
......@@ -1107,6 +1107,9 @@ void ff_mpv_common_end(MpegEncContext *s)
{
int i;
if (!s)
return ;
if (s->slice_context_count > 1) {
for (i = 0; i < s->slice_context_count; i++) {
free_duplicate_context(s->thread_context[i]);
......
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