diff options
-rw-r--r-- | macosx/Controller.m | 6 |
1 files 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; |