From: Ted Lemon Date: Tue, 9 Mar 1999 20:01:56 +0000 (+0000) Subject: Don't try to evaluate a null expression in evaluate_option_cache (). X-Git-Tag: V3-ALPHA-19990315~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4766ef10c0b80eeed9eeafeb079a5b221bdbf157;p=thirdparty%2Fdhcp.git Don't try to evaluate a null expression in evaluate_option_cache (). --- diff --git a/common/tree.c b/common/tree.c index 40fedfda6..234a715e3 100644 --- a/common/tree.c +++ b/common/tree.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: tree.c,v 1.19 1999/02/24 17:56:48 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; +"$Id: tree.c,v 1.20 1999/03/09 20:01:56 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -885,6 +885,8 @@ int evaluate_option_cache (result, packet, options, oc) &oc -> data, "evaluate_option_cache"); return 1; } + if (!oc -> expression) + return 0; return evaluate_data_expression (result, packet, options, oc -> expression); }