mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-25 20:28:27 +00:00
fix UB and possible HF trigger
This commit is contained in:
1 parent
7d53c21efe
commit
a0d9b6a7e0
3 files changed
+4
-2
No files matched your search
+1
-1
@@ -651,7 +651,7 @@ static void handle_tls_recv(struct mg_connection *c) {
|
||||
mg_error(c, "oom");
|
||||
} else {
|
||||
// Decrypt data directly into c->recv
|
||||
long n = mg_tls_recv(c, &io->buf[io->len], io->size - io->len);
|
||||
long n = mg_tls_recv(c, io->buf != NULL ? &io->buf[io->len] : io->buf, io->size - io->len);
|
||||
if (n == MG_IO_ERR) {
|
||||
mg_error(c, "TLS recv error");
|
||||
} else if (n > 0) {
|
||||
|
||||
Reference in new issue
Block a user