avcodec/rv34: Clear pointers in ff_rv34_decode_init_thread_copy()
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 18 Jul 2015 07:24:45 +0000 (09:24 +0200)
committerMike Gabriel <sunweaver@debian.org>
Sat, 31 Aug 2019 15:36:55 +0000 (16:36 +0100)
avcodec/rv34: Clear pointers in ff_rv34_decode_init_thread_copy()

Avoids leaving stale pointers
Fixes: signal_sigabrt_7ffff70eccc9_819_sabtriple.rm with memlimit 536870912
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Gbp-Pq: Name CVE-2015-6826.patch

libavcodec/rv34.c

index 4ed2a33b111cc2d7fab4e844f7bd97e639a39c43..7e445db3f088fd65fe1e6f7b2f7f5dc860dc19ce 100644 (file)
@@ -1525,7 +1525,14 @@ int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx)
 
     if (avctx->internal->is_copy) {
         r->tmp_b_block_base = NULL;
+        r->cbp_chroma       = NULL;
+        r->cbp_luma         = NULL;
+        r->deblock_coefs    = NULL;
+        r->intra_types_hist = NULL;
+        r->mb_type          = NULL;
+
         ff_mpv_idct_init(&r->s);
+
         if ((err = ff_mpv_common_init(&r->s)) < 0)
             return err;
         if ((err = rv34_decoder_alloc(r)) < 0) {