diff options
| author | 2007-12-13 22:03:20 +0000 | |
|---|---|---|
| committer | 2007-12-13 22:03:20 +0000 | |
| commit | c5bc32cdeb5f3c40df37763ad3345762adb4744d (patch) | |
| tree | feeeb617352351c0b7f9a5f99373106f4366db7e | |
| parent | Add missing license. This file is 4.4BSD-derived with WIDE changes. (diff) | |
| download | wireguard-openbsd-c5bc32cdeb5f3c40df37763ad3345762adb4744d.tar.xz wireguard-openbsd-c5bc32cdeb5f3c40df37763ad3345762adb4744d.zip | |
str fixes; from chl@
| -rw-r--r-- | usr.sbin/bind/bin/check/check-tool.c | 6 | ||||
| -rw-r--r-- | usr.sbin/bind/lib/dns/rdata/ch_3/a_1.c | 2 | ||||
| -rw-r--r-- | usr.sbin/bind/lib/dns/rdata/generic/ipseckey_45.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/bind/bin/check/check-tool.c b/usr.sbin/bind/bin/check/check-tool.c index 4209f8a3b0f..7613b76b095 100644 --- a/usr.sbin/bind/bin/check/check-tool.c +++ b/usr.sbin/bind/bin/check/check-tool.c @@ -123,7 +123,7 @@ checkns(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner, * Turn off search. */ if (dns_name_countlabels(name) > 1U) - strcat(namebuf, "."); + strlcat(namebuf, ".", sizeof(namebuf)); dns_name_format(owner, ownerbuf, sizeof(ownerbuf)); result = getaddrinfo(namebuf, NULL, &hints, &ai); @@ -295,7 +295,7 @@ checkmx(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) { * Turn off search. */ if (dns_name_countlabels(name) > 1U) - strcat(namebuf, "."); + strlcat(namebuf, ".", sizeof(namebuf)); dns_name_format(owner, ownerbuf, sizeof(ownerbuf)); result = getaddrinfo(namebuf, NULL, &hints, &ai); @@ -368,7 +368,7 @@ checksrv(dns_zone_t *zone, dns_name_t *name, dns_name_t *owner) { * Turn off search. */ if (dns_name_countlabels(name) > 1U) - strcat(namebuf, "."); + strlcat(namebuf, ".", sizeof(namebuf)); dns_name_format(owner, ownerbuf, sizeof(ownerbuf)); result = getaddrinfo(namebuf, NULL, &hints, &ai); diff --git a/usr.sbin/bind/lib/dns/rdata/ch_3/a_1.c b/usr.sbin/bind/lib/dns/rdata/ch_3/a_1.c index 7a09b436f40..2629bfb2286 100644 --- a/usr.sbin/bind/lib/dns/rdata/ch_3/a_1.c +++ b/usr.sbin/bind/lib/dns/rdata/ch_3/a_1.c @@ -87,7 +87,7 @@ totext_ch_a(ARGS_TOTEXT) { sub = name_prefix(&name, tctx->origin, &prefix); RETERR(dns_name_totext(&prefix, sub, target)); - sprintf(buf, "%o", addr); /* note octal */ + snprintf(buf, sizeof(buf), "%o", addr); /* note octal */ RETERR(str_totext(" ", target)); return (str_totext(buf, target)); } diff --git a/usr.sbin/bind/lib/dns/rdata/generic/ipseckey_45.c b/usr.sbin/bind/lib/dns/rdata/generic/ipseckey_45.c index 6c30dea9772..db86386759b 100644 --- a/usr.sbin/bind/lib/dns/rdata/generic/ipseckey_45.c +++ b/usr.sbin/bind/lib/dns/rdata/generic/ipseckey_45.c @@ -144,7 +144,7 @@ totext_ipseckey(ARGS_TOTEXT) { dns_rdata_toregion(rdata, ®ion); num = uint8_fromregion(®ion); isc_region_consume(®ion, 1); - sprintf(buf, "%u ", num); + snprintf(buf, sizeof(buf), "%u ", num); RETERR(str_totext(buf, target)); /* @@ -152,7 +152,7 @@ totext_ipseckey(ARGS_TOTEXT) { */ gateway = uint8_fromregion(®ion); isc_region_consume(®ion, 1); - sprintf(buf, "%u ", gateway); + snprintf(buf, sizeof(buf), "%u ", gateway); RETERR(str_totext(buf, target)); /* @@ -160,7 +160,7 @@ totext_ipseckey(ARGS_TOTEXT) { */ num = uint8_fromregion(®ion); isc_region_consume(®ion, 1); - sprintf(buf, "%u ", num); + snprintf(buf, sizeof(buf), "%u ", num); RETERR(str_totext(buf, target)); /* |
