diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-08-09 22:23:54 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-08-09 22:23:54 +0000 |
commit | 8b1676952c1d9b140da331a528d6b49caff9e58a (patch) | |
tree | f9a1a8a2a03e37b6b7be0c0fb867f6900f53251a /usr.sbin | |
parent | 1132f89b8b0c55af2d8caa8233f39ebdfd2a5ed8 (diff) |
Fix a reliability issue in dhcpd where a DHCPDISCOVER packet with a 32-byte
client identifier would cause dhcpd to mistakenly exit. From Debian bug
380273, affecting ISC dhcpd 2.x, upon which our dhcpd is based.
OK beck@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcpd/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/memory.c b/usr.sbin/dhcpd/memory.c index 4d73499da82..a2884ba4689 100644 --- a/usr.sbin/dhcpd/memory.c +++ b/usr.sbin/dhcpd/memory.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memory.c,v 1.13 2006/06/14 14:58:52 ckuethe Exp $ */ +/* $OpenBSD: memory.c,v 1.14 2006/08/09 22:23:53 cloder Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. @@ -499,7 +499,7 @@ supersede_lease(struct lease *comp, struct lease *lease, int commit) /* Copy the data files, but not the linkages. */ comp->starts = lease->starts; if (lease->uid) { - if (lease->uid_len < sizeof (lease->uid_buf)) { + if (lease->uid_len <= sizeof (lease->uid_buf)) { memcpy(comp->uid_buf, lease->uid, lease->uid_len); comp->uid = &comp->uid_buf[0]; comp->uid_max = sizeof comp->uid_buf; |