mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Add ostensibly unnecessary null check
This commit is contained in:
parent
8038a529c0
commit
8b3b7a0e23
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user