mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 19:47:47 +03:00
src/request_body_processor/multipart.cc: reduce the scope of variable in a for () loop
In general, it is always preferable to reduce the scope of a variable in a for loop
This commit is contained in:
@@ -231,7 +231,7 @@ int Multipart::boundary_characters_valid(const char *boundary) {
|
|||||||
|
|
||||||
|
|
||||||
void Multipart::validate_quotes(const char *data, char quote) {
|
void Multipart::validate_quotes(const char *data, char quote) {
|
||||||
int i, len;
|
int len;
|
||||||
|
|
||||||
if (data == NULL)
|
if (data == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -244,7 +244,7 @@ void Multipart::validate_quotes(const char *data, char quote) {
|
|||||||
|
|
||||||
len = strlen(data);
|
len = strlen(data);
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (int i = 0;i < len;i++) {
|
||||||
if (data[i] == '\'') {
|
if (data[i] == '\'') {
|
||||||
ms_dbg_a(m_transaction, 9,
|
ms_dbg_a(m_transaction, 9,
|
||||||
"Multipart: Invalid quoting detected: " \
|
"Multipart: Invalid quoting detected: " \
|
||||||
|
Reference in New Issue
Block a user