From 1891a87e99f2f2a9549bed48aacea631a2dfd358 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Fri, 26 Jan 2001 06:17:01 +0000 Subject: [PATCH] Don't dump core if asked to look up an option where there are no options. --- common/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.47.3