From 7ef8d38769ece1bae4f539d5492b501c2825e363 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Dec 2013 23:44:34 +0100 Subject: subreader: replace some strcpy calls --- demux/demux_subreader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'demux') diff --git a/demux/demux_subreader.c b/demux/demux_subreader.c index 2969e1b3b8..6bb39c960d 100644 --- a/demux/demux_subreader.c +++ b/demux/demux_subreader.c @@ -451,7 +451,8 @@ static subtitle *sub_read_line_subviewer(stream_t *st, subtitle *current, if (j != 0) full_line[j++] = '\n'; - strcpy(&full_line[j], line); + snprintf(&full_line[j], sizeof(full_line) - j, "%s", line); + full_line[LINE_LEN] = '\0'; j += len; } @@ -936,7 +937,7 @@ static subtitle *sub_read_line_jacosub(stream_t* st, subtitle * current, } else { current->alignment = SUB_ALIGNMENT_BOTTOMCENTER; } - strcpy(line2, line1); + snprintf(line2, sizeof(line2), "%s", line1); p = line2; } for (q = line1; (!eol(*p)) && (current->lines < SUB_MAX_TEXT); ++p) { -- cgit v1.2.3