mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-21 11:30:01 +00:00
Merge commit from fork
fix too short length guard
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user