From: Damien Neil Date: Wed, 23 Aug 2000 00:32:46 +0000 (+0000) Subject: Fix bug #253, which could cause the server to segfault when setting X-Git-Tag: V3-BETA-2-PATCH-1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=349c525e5bd4a394cb8ad5cadb1e042d70e75496;p=thirdparty%2Fdhcp.git Fix bug #253, which could cause the server to segfault when setting a value. --- diff --git a/common/execute.c b/common/execute.c index 6daf1c924..e665ee795 100644 --- a/common/execute.c +++ b/common/execute.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: execute.c,v 1.37 2000/08/22 21:51:29 neild Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: execute.c,v 1.38 2000/08/23 00:32:46 neild Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -273,12 +273,8 @@ int execute_statements (packet, lease, in_options, out_options, scope, if (binding -> name) { strcpy (binding -> name, r -> data.set.name); - if (lease) { - binding -> next = - lease -> scope -> bindings; - lease -> scope -> bindings = - binding; - } + binding -> next = (*scope) -> bindings; + (*scope) -> bindings = binding; } else { badalloc: dfree (binding, MDL);