diff --git a/mongoose.c b/mongoose.c index 3468a61c..41acbe25 100644 --- a/mongoose.c +++ b/mongoose.c @@ -17049,7 +17049,7 @@ static int mg_tls_recv_record(struct mg_connection *c) { msgsz = MG_LOAD_BE16(rio->buf + 3); msg = rio->buf + 5; - if (msgsz < 16) { + if (msgsz < 17) { mg_error(c, "wrong size"); return -1; } diff --git a/src/tls_builtin.c b/src/tls_builtin.c index 6bed1cf7..363f08fc 100644 --- a/src/tls_builtin.c +++ b/src/tls_builtin.c @@ -559,7 +559,7 @@ static int mg_tls_recv_record(struct mg_connection *c) { msgsz = MG_LOAD_BE16(rio->buf + 3); msg = rio->buf + 5; - if (msgsz < 16) { + if (msgsz < 17) { mg_error(c, "wrong size"); return -1; }