f4c359e5e8
IFNAMSIZ or shorter (#441524)
13 lines
577 B
Diff
13 lines
577 B
Diff
diff -up dhcp-4.1.0/server/dhcpd.c.ifnamsiz dhcp-4.1.0/server/dhcpd.c
|
|
--- dhcp-4.1.0/server/dhcpd.c.ifnamsiz 2009-04-20 16:35:30.000000000 -1000
|
|
+++ dhcp-4.1.0/server/dhcpd.c 2009-04-20 15:45:15.000000000 -1000
|
|
@@ -401,7 +401,7 @@ main(int argc, char **argv) {
|
|
log_fatal ("Insufficient memory to %s %s: %s",
|
|
"record interface", argv [i],
|
|
isc_result_totext (result));
|
|
- strcpy (tmp -> name, argv [i]);
|
|
+ strncpy (tmp -> name, argv [i], sizeof (tmp -> name));
|
|
if (interfaces) {
|
|
interface_reference (&tmp -> next,
|
|
interfaces, MDL);
|