Commit 20be063e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

We don't need to use strncpy() when we explicitly checked the

length already.  (This appearantly confuses Coverity ?)
parent 5e3eb0af
......@@ -401,9 +401,9 @@ identify(const char *i_arg)
strcpy(id, "varnishd");
if (i_arg != NULL) {
if (strlen(i_arg) + 1 >= sizeof heritage.identity)
if (strlen(i_arg) + 1 > sizeof heritage.identity)
ARGV_ERR("Identity (-i) name too long.\n");
strncpy(heritage.identity, i_arg, sizeof heritage.identity);
strcpy(heritage.identity, i_arg);
i = strlen(id);
id[i++] = '/';
for (; i < (sizeof(id) - 1L); i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment