From: Ted Lemon Date: Fri, 26 Jan 2001 06:17:01 +0000 (+0000) Subject: Don't dump core if asked to look up an option where there are no options. X-Git-Tag: V3-BETA-2-PATCH-16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1891a87e99f2f2a9549bed48aacea631a2dfd358;p=thirdparty%2Fdhcp.git Don't dump core if asked to look up an option where there are no options. --- diff --git a/common/options.c b/common/options.c index 7ef44051a..1ecf89693 100644 --- a/common/options.c +++ b/common/options.c @@ -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