From: John Stebbins Date: Wed, 7 Nov 2018 21:51:56 +0000 (-0800) Subject: decavcodec: fix use after free X-Git-Tag: 1.2.0~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c144ed4301adb6ff23739c6d2fca8108d44c46f;p=handbrake decavcodec: fix use after free Symptom was a crash at the end of subtitle scan. Fixes https://forum.handbrake.fr/viewtopic.php?f=13&t=38379 --- diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 499de9731..6c53fa928 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -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; }