diff options
author | Christian Hesse | 2018-08-28 18:08:33 +0200 |
---|---|---|
committer | Christian Hesse | 2018-09-11 08:47:12 +0200 |
commit | 71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7 (patch) | |
tree | 77b326abda5032e7fee82ee944d749c660978f37 | |
parent | parsing: ban sprintf() (diff) | |
download | cgit-71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7.tar.gz cgit-71ba7187e5eeeaf2f66bc27bc3b48a2014d37bb7.zip |
ui-log: ban strcpy()
Git upstream bans strcpy() with commit: automatically ban strcpy() c8af66ab8ad7cd78557f0f9f5ef6a52fd46ee6dd Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | ui-log.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
234 | strbuf_add(&msgbuf, "\n\n", 2); | 234 | strbuf_add(&msgbuf, "\n\n", 2); |
235 | 235 | ||
236 | /* Place wrap_symbol at position i in info->subject */ | 236 | /* Place wrap_symbol at position i in info->subject */ |
237 | strcpy(info->subject + i, wrap_symbol); | 237 | strlcpy(info->subject + i, wrap_symbol, subject_len - i + 1); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, | 240 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |