2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

more str{n}{cat,cpy} corrections rt45981_stage2

This commit is contained in:
Mark Andrews
2017-09-14 18:11:56 +10:00
parent bbe9f1dd95
commit cb629cdeda
26 changed files with 106 additions and 127 deletions

View File

@@ -453,8 +453,8 @@ parse_hmac(const dns_name_t **hmac, const char *hmacstr, size_t len,
return (ISC_FALSE);
}
strncpy(buf, hmacstr, len);
buf[len] = 0;
/* Copy len bytes and NUL terminate. */
strlcpy(buf, hmacstr, ISC_MIN(len + 1, sizeof(buf)));
#ifndef PK11_MD5_DISABLE
if (strcasecmp(buf, "hmac-md5") == 0) {