]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't dump core if asked to look up an option where there are no options. V3-BETA-2-PATCH-16
authorTed Lemon <source@isc.org>
Fri, 26 Jan 2001 06:17:01 +0000 (06:17 +0000)
committerTed Lemon <source@isc.org>
Fri, 26 Jan 2001 06:17:01 +0000 (06:17 +0000)
common/options.c

index 7ef44051a924e0cb3d2c7d64f72a6b47fdefcb23..1ecf89693dae33a42b26b90f0e58b7c49c137065 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.82 2001/01/25 21:55:08 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.83 2001/01/26 06:17:01 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -1263,6 +1263,8 @@ struct option_cache *lookup_option (universe, options, code)
        struct option_state *options;
        unsigned code;
 {
+       if (!options)
+               return (struct option_cache *)0;
        if (universe -> lookup_func)
                return (*universe -> lookup_func) (universe, options, code);
        else