[dhcp] improve range6.patch
Jiří Popelka
jpopelka at fedoraproject.org
Tue Sep 17 15:04:28 UTC 2013
commit 077cc7630bd975a15f249a79caa02d0a508e59fd
Author: Jiri Popelka <jpopelka at redhat.com>
Date: Tue Sep 17 14:24:09 2013 +0200
improve range6.patch
dhcp-4.2.5-range6.patch | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dhcp-4.2.5-range6.patch b/dhcp-4.2.5-range6.patch
index 754d899..a4f409f 100644
--- a/dhcp-4.2.5-range6.patch
+++ b/dhcp-4.2.5-range6.patch
@@ -11,8 +11,8 @@ index 12ab0e6..4454be9 100644
+ char lowbuf [INET6_ADDRSTRLEN], netbuf [INET6_ADDRSTRLEN];
+
+ if (!addr_eq(subnet->net, subnet_number(*addr, subnet->netmask))) {
-+ strcpy(lowbuf, piaddr(*addr));
-+ strcpy(netbuf, piaddr(subnet->net));
++ strncpy(lowbuf, piaddr(*addr), INET6_ADDRSTRLEN);
++ strncpy(netbuf, piaddr(subnet->net), INET6_ADDRSTRLEN);
+ log_fatal("bad range6, address %s not in subnet6 %s/%d",
+ lowbuf, netbuf, subnet->prefix_len);
+ }
More information about the scm-commits
mailing list