aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-16 11:52:33 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-16 12:18:30 +0200
commitf1a38264f20382731cf2cc75fdd98f4c9a84a626 (patch)
tree943ecdab8b3a69dc2e03daa0d3d3c64980a5d626
parent8dad213143e34b477f034ada4addf2ed2b1c983d (diff)
downloadffmpeg-f1a38264f20382731cf2cc75fdd98f4c9a84a626.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>
-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 df372e0c99..8987c12fe7 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -690,6 +690,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;
}