summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-03-07 21:32:04 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-03-07 21:32:04 -0800
commit93ee756f0b8951d7f6a2972c6c8dc05e890917a7 (patch)
treede39ff2e8d9d44b9bf02f4f61a3e81e85a340269 /socket.c
parenta33c3615316594011c80a37fbcbf18065f44c9fd (diff)
downloadtxr-93ee756f0b8951d7f6a2972c6c8dc05e890917a7.tar.gz
txr-93ee756f0b8951d7f6a2972c6c8dc05e890917a7.tar.bz2
txr-93ee756f0b8951d7f6a2972c6c8dc05e890917a7.zip
sock_accept: uninitialized socklen_t.
* socket.c (sock_accept): The address length passed to recvfrom was not initialized to the storage length.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index ab6b4e6c..c7660536 100644
--- a/socket.c
+++ b/socket.c
@@ -656,7 +656,7 @@ static val sock_accept(val sock, val mode_str)
val family = sock_family(sock);
val type = sock_type(sock);
struct sockaddr_storage sa;
- socklen_t salen;
+ socklen_t salen = sizeof sa;
val peer = nil;
if (type == num_fast(SOCK_DGRAM)) {