afl - Don't fail if app-layer proto enabled value is NULL.

Found by using AFL on suricata.yaml.
pull/1454/head
Jason Ish 11 years ago committed by Victor Julien
parent 0376b60da9
commit 75d21851cf

@ -1630,16 +1630,19 @@ int AppLayerProtoDetectConfProtoDetectionEnabled(const char *ipproto,
} }
} }
if (strcasecmp(node->val, "yes") == 0) { if (node->val) {
if (ConfValIsTrue(node->val)) {
goto enabled; goto enabled;
} else if (strcasecmp(node->val, "no") == 0) { } else if (ConfValIsFalse(node->val)) {
goto disabled; goto disabled;
} else if (strcasecmp(node->val, "detection-only") == 0) { } else if (strcasecmp(node->val, "detection-only") == 0) {
goto enabled; goto enabled;
} else { }
}
/* Invalid or null value. */
SCLogError(SC_ERR_FATAL, "Invalid value found for %s.", param); SCLogError(SC_ERR_FATAL, "Invalid value found for %s.", param);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
}
disabled: disabled:
enabled = 0; enabled = 0;

Loading…
Cancel
Save