diff options
author | Andrei Vagin <avagin@google.com> | 2021-02-12 10:56:15 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-12 10:58:17 -0800 |
commit | a6d813ad55ae80a2c4173fc3fd3961236327cf8b (patch) | |
tree | 73083c4ab7d64cc57c3ce94bfd4861de68a15aa9 /test | |
parent | 845d0a65f449ade1952568b5fc120e7cb8cd709f (diff) |
tests: getsockname expects that addrlen will be initialized
PiperOrigin-RevId: 357224877
Diffstat (limited to 'test')
-rw-r--r-- | test/syscalls/linux/udp_socket.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/syscalls/linux/udp_socket.cc b/test/syscalls/linux/udp_socket.cc index 50f589708..16eeeb5c6 100644 --- a/test/syscalls/linux/udp_socket.cc +++ b/test/syscalls/linux/udp_socket.cc @@ -2131,8 +2131,8 @@ TEST(UdpInet6SocketTest, ConnectInet4Sockaddr) { reinterpret_cast<const struct sockaddr*>(&connect_sockaddr), sizeof(sockaddr_in)), SyscallSucceeds()); - socklen_t len; sockaddr_storage sockname; + socklen_t len = sizeof(sockaddr_storage); ASSERT_THAT(getsockname(sock_.get(), reinterpret_cast<struct sockaddr*>(&sockname), &len), SyscallSucceeds()); |