diff m_option.c @ 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 4640f25fef12
children 6180d7558f75
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") ||