summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1998-06-26 04:17:12 +0000
committerTed Lemon <source@isc.org>1998-06-26 04:17:12 +0000
commit6b8e11e8b26ddf78959407b5fb07cf9bd7e4de9e (patch)
tree39e4cd793a7a3c0a36525eb646f8ff64a67c1cde
parente6c083da0d1afb1fcc816bd8bb470d3bf76f16dc (diff)
downloadisc-dhcp-6b8e11e8b26ddf78959407b5fb07cf9bd7e4de9e.tar.gz
Fix possible null pointer dereference. Remove newlines from "reclaimed" syslog messages.
-rw-r--r--server/dhcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/dhcp.c b/server/dhcp.c
index 8c94b88a..7387e465 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.57.2.4 1998/06/25 22:12:05 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.57.2.5 1998/06/26 04:17:12 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -120,7 +120,7 @@ void dhcpdiscover (packet)
warning message, so that if it continues to lose,
the administrator will eventually investigate. */
if (lease -> flags & ABANDONED_LEASE) {
- warn ("Reclaiming abandoned IP address %s.\n",
+ warn ("Reclaiming abandoned IP address %s.",
piaddr (lease -> ip_addr));
lease -> flags &= ~ABANDONED_LEASE;
}
@@ -1391,8 +1391,8 @@ struct lease *find_lease (packet, share, ours)
/* If we find an abandoned lease, take it, but print a
warning message, so that if it continues to lose,
the administrator will eventually investigate. */
- if (lease -> flags & ABANDONED_LEASE) {
- warn ("Reclaiming REQUESTed abandoned IP address %s.\n",
+ if (lease && lease -> flags & ABANDONED_LEASE) {
+ warn ("Reclaiming REQUESTed abandoned IP address %s.",
piaddr (lease -> ip_addr));
lease -> flags &= ~ABANDONED_LEASE;
}