Fix compilation of address and port error messages in debug mode.

remotes/origin/master-1.0.x
Victor Julien 17 years ago
parent dc44700ce5
commit 171edda02a

@ -774,7 +774,7 @@ int DetectAddressParse2(DetectAddressHead *gh,
if (negate == 1 || n_set == 1) {
temp_rule_var_address = malloc(strlen(rule_var_address) + 3);
if (temp_rule_var_address == NULL) {
SCLogDebug(SC_ERR_MEM_ALLOC, "Error allocating memory");
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
goto error;
}
snprintf(temp_rule_var_address, strlen(rule_var_address) + 3,
@ -814,7 +814,7 @@ int DetectAddressParse2(DetectAddressHead *gh,
if (negate == 1 || n_set == 1) {
temp_rule_var_address = malloc(strlen(rule_var_address) + 3);
if (temp_rule_var_address == NULL) {
SCLogDebug(SC_ERR_MEM_ALLOC, "Error allocating memory");
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
goto error;
}
snprintf(temp_rule_var_address, strlen(rule_var_address) + 3,

@ -1036,7 +1036,7 @@ static int DetectPortParseDo(DetectPort **head, DetectPort **nhead, char *s,
if (negate == 1 || n_set == 1) {
temp_rule_var_port = malloc(strlen(rule_var_port) + 3);
if (temp_rule_var_port == NULL) {
SCLogDebug(SC_ERR_MEM_ALLOC, "Error allocating memory");
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
goto error;
}
snprintf(temp_rule_var_port, strlen(rule_var_port) + 3,
@ -1077,7 +1077,7 @@ static int DetectPortParseDo(DetectPort **head, DetectPort **nhead, char *s,
if (negate == 1 || n_set == 1) {
temp_rule_var_port = malloc(strlen(rule_var_port) + 3);
if (temp_rule_var_port == NULL) {
SCLogDebug(SC_ERR_MEM_ALLOC, "Error allocating memory");
SCLogError(SC_ERR_MEM_ALLOC, "Error allocating memory");
goto error;
}
snprintf(temp_rule_var_port, strlen(rule_var_port) + 3,

Loading…
Cancel
Save