8000 Merge pull request #3 from abelsensors/feature/VV-2986_Fix_watchdog_t… · abelsensors/esp32_https_server@6cf1aed · GitHub
[go: up one dir, main page]

Skip to content

Commit 6cf1aed

Browse files
Merge pull request #3 from abelsensors/feature/VV-2986_Fix_watchdog_timeout_after_multipart_line_too_long
VV-2986 Also stop the peekBoundary() loop in nextField() when the pee…
2 parents caf6719 + 0c03fac commit 6cf1aed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/HTTPMultipartBodyParser.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,14 @@ bool HTTPMultipartBodyParser::peekBoundary() {
169169

170170
int32_t HTTPMultipartBodyParser::nextField() {
171171
fillBuffer(MAXLINESIZE);
172-
while(!peekBoundary()) {
172+
while (!peekBoundary()) {
173+
if (peekBufferSize == 0) {
174+
HTTPS_LOGE("Multipart missing last boundary1");
175+
return -1;
176+
}
173177
std::string dummy = readLine();
174178
if (endOfBody()) {
175-
HTTPS_LOGE("Multipart missing last boundary");
179+
HTTPS_LOGE("Multipart missing last boundary2");
176180
return -1;
177181
}
178182
fillBuffer(MAXLINESIZE);

0 commit comments

Comments
 (0)
0