mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +00:00
Fix a buffer overflow problem (not a security issue). Thanks to Joe.
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
static char ocopyright[] =
|
||||||
"$Id: dhclient.c,v 1.103 2000/05/30 21:17:04 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium. All rights reserved.\n";
|
"$Id: dhclient.c,v 1.104 2000/05/30 21:43:42 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -179,6 +179,9 @@ int main (argc, argv, envp)
|
|||||||
if (status != ISC_R_SUCCESS)
|
if (status != ISC_R_SUCCESS)
|
||||||
log_fatal ("Can't record interface %s:%s",
|
log_fatal ("Can't record interface %s:%s",
|
||||||
argv [i], isc_result_totext (status));
|
argv [i], isc_result_totext (status));
|
||||||
|
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||||
|
log_fatal ("%s: interface name too long (max %d)",
|
||||||
|
argv [i], strlen (argv [i]));
|
||||||
strcpy (tmp -> name, argv [i]);
|
strcpy (tmp -> name, argv [i]);
|
||||||
if (interfaces) {
|
if (interfaces) {
|
||||||
interface_reference (&tmp -> next,
|
interface_reference (&tmp -> next,
|
||||||
|
Reference in New Issue
Block a user