aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-16 11:52:33 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-20 04:43:41 +0200
commited6d8e185a4e8145b68a48e946b9bd22fc4efce5 (patch)
tree82284ae58d923dfbc47ff2740b963f4551e5b65c /libavcodec
parentfb47b6cb4b897fad03c6977b20c36a954f3f2de3 (diff)
downloadffmpeg-ed6d8e185a4e8145b68a48e946b9bd22fc4efce5.tar.gz
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: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit f1a38264f20382731cf2cc75fdd98f4c9a84a626) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread_frame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index e7ac377e3c..41fafcefd4 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -669,6 +669,7 @@ int ff_frame_thread_init(AVCodecContext *avctx)
copy->internal = av_malloc(sizeof(AVCodecInternal));
if (!copy->internal) {
+ copy->priv_data = NULL;
err = AVERROR(ENOMEM);
goto error;
}