mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Add ostensibly unnecessary null check
This commit is contained in:
@@ -1431,6 +1431,7 @@ static int var_multipart_part_headers_generate(modsec_rec *msr, msre_var *var, m
|
||||
|
||||
/* If we had a match add this argument to the collection. */
|
||||
if (match) {
|
||||
if (parts[i]->header_lines) { /* this NULL check shouldn't be necessary */
|
||||
for (j = 0; j < parts[i]->header_lines->nelts; j++) {
|
||||
char *header_line = ((char **)parts[i]->header_lines->elts)[j];
|
||||
msre_var *rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
|
||||
@@ -1445,6 +1446,7 @@ static int var_multipart_part_headers_generate(modsec_rec *msr, msre_var *var, m
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
Reference in New Issue
Block a user