mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +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:
parent
b23abf440a
commit
7fed599fdb
@ -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: " \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user