[FFmpeg-cvslog] avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case

Michael Niedermayer git at videolan.org
Tue Jul 28 03:21:46 CEST 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 16 11:52:33 2015 +0200| [b7c8d072ea1bde2edd8f2b1b83d3463b6ca4c844] | committer: 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: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit f1a38264f20382731cf2cc75fdd98f4c9a84a626)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7c8d072ea1bde2edd8f2b1b83d3463b6ca4c844
---

 libavcodec/pthread_frame.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index e7ac377..41fafce 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;
         }



More information about the ffmpeg-cvslog mailing list