Commit f1a38264 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case

Fixes: b4b47bc2b3fb7ca710bfffe5aa969e37_signal_sigabrt_7ffff70eccc9_744_nc_sample2.avi with memlimit of 4194304

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8dad2131
...@@ -690,6 +690,7 @@ int ff_frame_thread_init(AVCodecContext *avctx) ...@@ -690,6 +690,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
copy->internal = av_malloc(sizeof(AVCodecInternal)); copy->internal = av_malloc(sizeof(AVCodecInternal));
if (!copy->internal) { if (!copy->internal) {
copy->priv_data = NULL;
err = AVERROR(ENOMEM); err = AVERROR(ENOMEM);
goto error; goto error;
} }
......
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