changeset 10355:b39a943c902f

Fix the segfault in case of missing arg for flag options in config files.
author albeu
date Tue, 01 Jul 2003 09:26:49 +0000
parents 18ad3cda99d4
children 7b358cd956fd
files m_option.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Tue Jul 01 08:49:14 2003 +0000
+++ b/m_option.c	Tue Jul 01 09:26:49 2003 +0000
@@ -75,6 +75,7 @@
 
 static int parse_flag(m_option_t* opt,char *name, char *param, void* dst, int src) {
   if (src == M_CONFIG_FILE) {
+    if(!param) return M_OPT_MISSING_PARAM;
     if (!strcasecmp(param, "yes") ||	/* any other language? */
 	!strcasecmp(param, "on") ||
 	!strcasecmp(param, "ja") ||