From mboxrd@z Thu Jan 1 00:00:00 1970 From: list at eworm.de (Christian Hesse) Date: Tue, 28 Aug 2018 20:38:20 +0200 Subject: [PATCH 3/9] ui-log: ban strcpy() In-Reply-To: <20180828183826.25043-1-list@eworm.de> References: <20180828183826.25043-1-list@eworm.de> Message-ID: <20180828183826.25043-3-list@eworm.de> From: Christian Hesse Git upstream bans strcpy() with commit: automatically ban strcpy() c8af66ab8ad7cd78557f0f9f5ef6a52fd46ee6dd Signed-off-by: Christian Hesse --- ui-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-log.c b/ui-log.c index d696e20..c2f92fe 100644 --- a/ui-log.c +++ b/ui-log.c @@ -234,7 +234,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) strbuf_add(&msgbuf, "\n\n", 2); /* Place wrap_symbol at position i in info->subject */ - strcpy(info->subject + i, wrap_symbol); + strlcpy(info->subject + i, wrap_symbol, subject_len - i + 1); } } cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,