From 4ae66f9801e2dc90c4b43aad2137bcc01fa7ad4c Mon Sep 17 00:00:00 2001 From: dynaflash Date: Fri, 15 Apr 2011 14:22:59 +0000 Subject: [PATCH] MacGui: Allow SRT File Paths up to 256 characters - Patch by Rodeo as per https://reviews.handbrake.fr/r/51/ Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3926 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index 7af452a98..6aef27a8e 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -3661,8 +3661,10 @@ bool one_burned = FALSE; sub_config.offset = [[tempObject objectForKey:@"subtitleTrackSrtOffset"] intValue]; /* we need to srncpy file name and codeset */ - strncpy(sub_config.src_filename, [[tempObject objectForKey:@"subtitleSourceSrtFilePath"] UTF8String], 128); - strncpy(sub_config.src_codeset, [[tempObject objectForKey:@"subtitleTrackSrtCharCode"] UTF8String], 40); + strncpy(sub_config.src_filename, [[tempObject objectForKey:@"subtitleSourceSrtFilePath"] UTF8String], 255); + sub_config.src_filename[255] = 0; + strncpy(sub_config.src_codeset, [[tempObject objectForKey:@"subtitleTrackSrtCharCode"] UTF8String], 39); + sub_config.src_codeset[39] = 0; sub_config.force = 0; sub_config.dest = PASSTHRUSUB; -- 2.40.0