]> granicus.if.org Git - handbrake/commitdiff
decavcodec: fix use after free
authorJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 7 Nov 2018 21:51:56 +0000 (13:51 -0800)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Wed, 7 Nov 2018 21:51:56 +0000 (13:51 -0800)
Symptom was a crash at the end of subtitle scan.
Fixes https://forum.handbrake.fr/viewtopic.php?f=13&t=38379

libhb/decavcodec.c

index 499de97315ab33719d5a1ffa206c5a2773d97f6c..6c53fa9280705edacc2d4cf57451267f12f23b01 100644 (file)
@@ -1722,7 +1722,7 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
                 continue;
             }
         }
-        hb_buffer_list_append(&pv->list, in);
+        hb_buffer_list_append(&pv->list, hb_buffer_dup(in));
         *buf_out = hb_buffer_list_clear(&pv->list);
         return HB_WORK_DONE;
     }