From 53be54ff795f076b5d13534c24f1bc31ac3d22d9 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 10 Dec 2014 16:23:44 +0000 Subject: decsrtsub: fix incorrect usage of strncat git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6592 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/decsrtsub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libhb/decsrtsub.c') diff --git a/libhb/decsrtsub.c b/libhb/decsrtsub.c index e0e0f2d2b..da58c9616 100644 --- a/libhb/decsrtsub.c +++ b/libhb/decsrtsub.c @@ -448,7 +448,7 @@ static hb_buffer_t *srt_read( hb_work_private_t *pv ) * Well.. looks like we are in the wrong mode.. lets add the * newline we misinterpreted... */ - strncat(pv->current_entry.text, " ", 1024); + strncat(pv->current_entry.text, " ", sizeof(pv->current_entry.text) - strlen(pv->current_entry.text) - 1); pv->current_state = k_state_inEntry_or_new; continue; } -- cgit v1.2.3