2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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

@@ -159,8 +159,8 @@ bind_ttl(isc_textregion_t *source, isc_uint32_t *ttl) {
*/
if (source->length > sizeof(buf) - 1)
return (DNS_R_SYNTAX);
strncpy(buf, source->base, source->length);
buf[source->length] = '\0';
/* Copy source->length bytes and NUL terminate. */
strlcpy(buf, source->base, ISC_MIN(source->length + 1, sizeof(buf)));
s = buf;
do {