Skip to content

Commit f685253

Browse files
committed
Add assertion for multipart boundary in multipart_complete
To satisfy Quality Gate in CI. owasp-modsecurity#3483 (comment)
1 parent a96b557 commit f685253

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

apache2/msc_multipart.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,10 +1023,7 @@ int multipart_complete(modsec_rec *msr, char **error_msg) {
10231023
* processed yet) in the buffer.
10241024
*/
10251025
if (msr->mpd->buf_contains_line) {
1026-
if (msr->mpd->boundary == NULL) {
1027-
*error_msg = apr_psprintf(msr->mp, "Multipart: BUG: multipart_complete must not be called if multipart_init returns an error.");
1028-
return -1;
1029-
}
1026+
assert(msr->mpd->boundary != NULL);
10301027

10311028
/*
10321029
* Note that the buffer may end with the final boundary followed by only CR,

0 commit comments

Comments
 (0)