mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Removes some warnings by adding missing returns
This commit is contained in:
@@ -44,12 +44,11 @@ bool Multipart::init() {
|
||||
}
|
||||
|
||||
std::size_t boundary_pos = m_header.find("boundary");
|
||||
if (boundary_pos < 0) {
|
||||
if (boundary_pos > 0 && m_header.find("boundary", boundary_pos) > 0) {
|
||||
debug(4, "Multipart: Multiple boundary parameters in " \
|
||||
"Content-Type.");
|
||||
return false;
|
||||
}
|
||||
if (boundary_pos != std::string::npos &&
|
||||
m_header.find("boundary", boundary_pos + 1) != std::string::npos) {
|
||||
debug(4, "Multipart: Multiple boundary parameters in " \
|
||||
"Content-Type.");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string boundary = m_header.c_str() + boundary_pos;
|
||||
|
@@ -70,6 +70,8 @@ bool MultipartBlob::processContent() {
|
||||
offset = end + 1;
|
||||
}
|
||||
content = std::string(m_blob, offset, m_blob.length() - offset + 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +125,8 @@ bool MultipartBlob::processContentDispositionLine(
|
||||
filename = std::string(dispositionLine, offset, end - offset);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user