Fix logging messages related to icmp_id parsing

remotes/origin/master-1.0.x
Gerardo Iglesias Galvan 17 years ago committed by Victor Julien
parent 4b39ddaf95
commit f5743afed5

@ -127,7 +127,7 @@ DetectIcmpIdData *DetectIcmpIdParse (char *icmpidstr) {
ret = pcre_exec(parse_regex, parse_regex_study, icmpidstr, strlen(icmpidstr), 0, 0, ov, MAX_SUBSTRINGS);
if (ret < 1 || ret > 4) {
SCLogError(SC_PCRE_MATCH_FAILED, "DetectIcmpIdParse: parse error");
SCLogError(SC_PCRE_MATCH_FAILED, "Parse error %s", icmpidstr);
goto error;
}
@ -136,7 +136,7 @@ DetectIcmpIdData *DetectIcmpIdParse (char *icmpidstr) {
for (i = 1; i < ret; i++) {
res = pcre_get_substring((char *)icmpidstr, ov, MAX_SUBSTRINGS, i, &str_ptr);
if (res < 0) {
SCLogError(SC_PCRE_GET_SUBSTRING_FAILED, "DetectIcmpIdParse: pcre_get_substring failed");
SCLogError(SC_PCRE_GET_SUBSTRING_FAILED, "pcre_get_substring failed");
goto error;
}
substr[i-1] = (char *)str_ptr;
@ -151,12 +151,12 @@ DetectIcmpIdData *DetectIcmpIdParse (char *icmpidstr) {
if (strlen(substr[0]) != 0) {
if (substr[2] == NULL) {
SCLogError(SC_INVALID_ARGUMENT, "DetectIcmpIdParse: Missing close quote in input");
SCLogError(SC_INVALID_ARGUMENT, "Missing close quote in input");
goto error;
}
} else {
if (substr[2] != NULL) {
SCLogError(SC_INVALID_ARGUMENT, "DetectIcmpIdParse: Missing open quote in input");
SCLogError(SC_INVALID_ARGUMENT, "Missing open quote in input");
goto error;
}
}

Loading…
Cancel
Save