From 0c144ed4301adb6ff23739c6d2fca8108d44c46f Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 7 Nov 2018 13:51:56 -0800 Subject: [PATCH] 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 --- libhb/decavcodec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0