We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4e0840 commit 042eb43Copy full SHA for 042eb43
mongoose/mongoose.c
@@ -5961,6 +5961,12 @@ static int mg_http_multipart_wait_for_boundary(struct mg_connection *c) {
5961
struct mbuf *io = &c->recv_mbuf;
5962
struct mg_http_proto_data *pd = mg_http_get_proto_data(c);
5963
5964
+ if (pd->mp_stream.boundary == NULL) {
5965
+ pd->mp_stream.state = MPS_FINALIZE;
5966
+ DBG(("Invalid request: boundary not initilaized"));
5967
+ return 0;
5968
+ }
5969
+
5970
if ((int) io->len < pd->mp_stream.boundary_len + 2) {
5971
return 0;
5972
}
0 commit comments