summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangzl2013 <zhangzl2013@126.com>2019-09-15 05:31:23 -0400
committerThomas Markwalder <tmark@isc.org>2019-11-08 09:51:16 -0500
commit8d951ea097f815dadc6c17f326a0a453bebfe7dc (patch)
treee8c41dffadfe10950627b25943d080cd78e7f685
parentdbd36dfa82956b53683462afadfabb1b33fa3dd1 (diff)
downloadisc-dhcp-8d951ea097f815dadc6c17f326a0a453bebfe7dc.tar.gz
dns: fix buffer overflow in zone_name
-rw-r--r--common/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/dns.c b/common/dns.c
index 4250614e..bdd8af46 100644
--- a/common/dns.c
+++ b/common/dns.c
@@ -1246,7 +1246,7 @@ find_cached_zone(dhcp_ddns_cb_t *ddns_cb, int direction)
}
/* Make sure the zone name will fit. */
- if (strlen(zone->name) > sizeof(ddns_cb->zone_name)) {
+ if (strlen(zone->name) >= sizeof(ddns_cb->zone_name)) {
dns_zone_dereference(&zone, MDL);
return (ISC_R_NOSPACE);
}