mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
useless (and now incorrect) check
This commit is contained in:
@@ -283,11 +283,9 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
|
|||||||
}
|
}
|
||||||
} while (p != NULL && *next_text_start);
|
} while (p != NULL && *next_text_start);
|
||||||
|
|
||||||
/* If there's more than one member of the array that
|
/* Combine text parts into a single string now.
|
||||||
* means there was at least one macro present. Combine
|
* If no macro was present, we already returned
|
||||||
* text parts into a single string now.
|
|
||||||
*/
|
*/
|
||||||
if (arr->nelts > 1) {
|
|
||||||
/* Figure out the required size for the string. */
|
/* Figure out the required size for the string. */
|
||||||
var->value_len = 0;
|
var->value_len = 0;
|
||||||
for(i = 0; i < arr->nelts; i++) {
|
for(i = 0; i < arr->nelts; i++) {
|
||||||
@@ -307,7 +305,6 @@ int expand_macros(modsec_rec *msr, msc_string *var, msre_rule *rule, apr_pool_t
|
|||||||
offset += part->value_len;
|
offset += part->value_len;
|
||||||
}
|
}
|
||||||
var->value[offset] = '\0';
|
var->value[offset] = '\0';
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user