History

ui-log: ban strcpy()

Git upstream bans strcpy() with commit: automatically ban strcpy() c8af66ab8ad7cd78557f0f9f5ef6a52fd46ee6dd

Christian Hesse committed 8 years ago

Commit 71ba7181 parent 60a93001 file · +1 −1Browse files

Unified · Split

ui-log.c+1−1
@@ -234,7 +234,7 @@ static void print_commit(struct commit *commit, struct rev_info *revs) · 233 unmodified lines
234234 strbuf_add(&msgbuf, "\n\n", 2);
235235
236236 /* 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);
238238 }
239239 }
240240 cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,