dhcp-4.2.0-IFNAMSIZ.patch 577 B

12345678910111213
  1. diff -up dhcp-4.2.0/server/dhcpd.c.ifnamsiz dhcp-4.2.0/server/dhcpd.c
  2. --- dhcp-4.2.0/server/dhcpd.c.ifnamsiz 2010-07-21 14:31:39.000000000 +0200
  3. +++ dhcp-4.2.0/server/dhcpd.c 2010-07-21 16:05:49.000000000 +0200
  4. @@ -409,7 +409,7 @@ main(int argc, char **argv) {
  5. log_fatal ("Insufficient memory to %s %s: %s",
  6. "record interface", argv [i],
  7. isc_result_totext (result));
  8. - strcpy (tmp -> name, argv [i]);
  9. + strncpy (tmp -> name, argv [i], sizeof (tmp -> name));
  10. if (interfaces) {
  11. interface_reference (&tmp -> next,
  12. interfaces, MDL);