fix too short length guard

This commit is contained in:
Sergio R. Caprile committed 2026-08-03 14:19:13 -03:00
1 parent 7fa830fc0c
commit 758e301f0c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -16904,7 +16904,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;
}
+1 -1
View File
@@ -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;
}