From 8b1676952c1d9b140da331a528d6b49caff9e58a Mon Sep 17 00:00:00 2001 From: Chad Loder Date: Wed, 9 Aug 2006 22:23:54 +0000 Subject: 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@ --- usr.sbin/dhcpd/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/dhcpd') 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; -- cgit v1.2.3