--- icd-1.0.0/app_icd.c.orig 2005-07-01 21:22:01.000000000 +0200 +++ icd-1.0.0/app_icd.c 2005-07-01 21:23:31.000000000 +0200 @@ -1628,9 +1628,8 @@ if (strcasecmp(entry, "events") == 0) { if (strcasecmp(varlist->name, "module_mask") == 0) { /* iterrate over our modules & see if the module string is in the module_mask */ - for (mod = APP_ICD; mod <= ICD_MAX_MODULES; ++mod) { - if (icd_module_strings[mod] != NULL && - icd_instr(varlist->value, icd_module_strings[mod], icd_delimiter) ) + for (mod = APP_ICD; mod <= ICD_MAX_MODULES && icd_module_strings[mod] != NULL; ++mod) { + if (icd_instr(varlist->value, icd_module_strings[mod], icd_delimiter) ) module_mask[mod]=1; else module_mask[mod]=0; @@ -1640,9 +1639,9 @@ } /*module_mask*/ if (strcasecmp(varlist->name, "event_mask") == 0) { /* iterrate over our events & see if the event string is in the event_mask */ - for (event = ICD_EVENT_TEST; event <= ICD_MAX_EVENTS; ++event) { - if (icd_event_strings[event] != NULL && - icd_instr(varlist->value, icd_event_strings[event], icd_delimiter)) + for (event = ICD_EVENT_TEST; event <= ICD_MAX_EVENTS && + icd_event_strings[event] != NULL; ++event) { + if (icd_instr(varlist->value, icd_event_strings[event], icd_delimiter)) event_mask[event]=1; else event_mask[event]=0;