]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't try to evaluate a null expression in evaluate_option_cache ().
authorTed Lemon <source@isc.org>
Tue, 9 Mar 1999 20:01:56 +0000 (20:01 +0000)
committerTed Lemon <source@isc.org>
Tue, 9 Mar 1999 20:01:56 +0000 (20:01 +0000)
common/tree.c

index 40fedfda6279d73a4362a4d3165ce0d04879c393..234a715e3098e079d5d5d64ee28578114d11e2f4 100644 (file)
@@ -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);
 }