From 48800697752197595e75a235f9c6589999d1e303 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 11 Jun 2020 18:38:42 +0100 Subject: [PATCH] Fix #1112 --- mongoose.c | 4 +--- src/mg_http.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mongoose.c b/mongoose.c index 6a409a33..c0bc0ba3 100644 --- a/mongoose.c +++ b/mongoose.c @@ -6859,7 +6859,7 @@ static int mg_http_multipart_continue_wait_for_chunk(struct mg_connection *c) { mbuf_remove(io, consumed); } return 0; - } else if (boundary != NULL) { + } else { size_t data_len = ((size_t)(boundary - io->buf) - 4); size_t consumed = mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_DATA, io->buf, data_len); @@ -6871,8 +6871,6 @@ static int mg_http_multipart_continue_wait_for_chunk(struct mg_connection *c) { } else { return 0; } - } else { - return 0; } } diff --git a/src/mg_http.c b/src/mg_http.c index 919251aa..c8186e85 100644 --- a/src/mg_http.c +++ b/src/mg_http.c @@ -1212,7 +1212,7 @@ static int mg_http_multipart_continue_wait_for_chunk(struct mg_connection *c) { mbuf_remove(io, consumed); } return 0; - } else if (boundary != NULL) { + } else { size_t data_len = ((size_t)(boundary - io->buf) - 4); size_t consumed = mg_http_multipart_call_handler(c, MG_EV_HTTP_PART_DATA, io->buf, data_len); @@ -1224,8 +1224,6 @@ static int mg_http_multipart_continue_wait_for_chunk(struct mg_connection *c) { } else { return 0; } - } else { - return 0; } }