diff options
author | Christian Hesse <mail@eworm.de> | 2018-08-28 19:14:32 +0300 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-09-11 09:47:12 +0300 |
commit | 60a930044d57faae4fcb84cba9d85310b0c767a7 (patch) | |
tree | e4ac6976f48f227d04982ecd7a17bdab74fb0db2 | |
parent | 7cde5885d8ce53359ee665bb930b1da956e8369a (diff) |
parsing: ban sprintf()
Git upstream bans sprintf() with commit:
banned.h: mark sprintf() as banned
cc8fdaee1eeaf05d8dd55ff11f111b815f673c58
Signed-off-by: Christian Hesse <mail@eworm.de>
-rw-r--r-- | parsing.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -77,7 +77,7 @@ static void parse_user(const char *t, char **name, char **email, unsigned long * email_len = ident.mail_end - ident.mail_begin; *email = xmalloc(strlen("<") + email_len + strlen(">") + 1); - sprintf(*email, "<%.*s>", email_len, ident.mail_begin); + xsnprintf(*email, email_len + 3, "<%.*s>", email_len, ident.mail_begin); if (ident.date_begin) *date = strtoul(ident.date_begin, NULL, 10); |