Skip to content

Commit

Permalink
Merge pull request RIOT-OS#4325 from OlegHahm/posix_socket_recvfrom_init
Browse files Browse the repository at this point in the history
posix sockets: initialize sockaddr properly to 0
  • Loading branch information
OlegHahm committed Nov 26, 2015
2 parents 2b1a0dc + 7efc8fd commit 56903f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sys/posix/sockets/posix_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags,
errno = EINVAL;
return -1;
}
memset(&tmp, 0, sizeof(struct sockaddr_storage));
switch (s->domain) {
case AF_INET:
addr = _in_addr_ptr(&tmp);
Expand Down

0 comments on commit 56903f3

Please sign in to comment.