From 9104d7684cb760b4867c9c4189d964b9263b5ee7 Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Wed, 18 May 2016 19:27:42 +0200 Subject: [PATCH] fix msg.send() --- extmod/modtrezormsg/modtrezormsg-unix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/modtrezormsg/modtrezormsg-unix.h b/extmod/modtrezormsg/modtrezormsg-unix.h index 1cfd5504..95faecd3 100644 --- a/extmod/modtrezormsg/modtrezormsg-unix.h +++ b/extmod/modtrezormsg/modtrezormsg-unix.h @@ -42,7 +42,7 @@ const uint8_t *msg_recv(void) { static uint8_t buf[RECV_BUFLEN]; struct sockaddr_in si; - socklen_t sl; + socklen_t sl = sizeof(si); memset(buf, 0, sizeof(buf)); int len = recvfrom(s, buf, RECV_BUFLEN, MSG_DONTWAIT, (struct sockaddr *)&si, &sl); if (len < 0) {