summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-01 23:04:04 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-01 23:04:04 +0200
commit00090f07fb6b706769fcf25054734d18698fcf76 (patch)
tree90912ef32305d1d28949846a07a7de55779d90de
parent34d29a0d710f94a2ac4ec660547c963af25b2512 (diff)
downloadsocket_wrapper-00090f07fb6b706769fcf25054734d18698fcf76.tar.gz
socket_wrapper-00090f07fb6b706769fcf25054734d18698fcf76.tar.xz
socket_wrapper-00090f07fb6b706769fcf25054734d18698fcf76.zip
src: Make sure addr is not NULL.
-rw-r--r--src/socket_wrapper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index b336514..ac1ea03 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -2050,9 +2050,11 @@ static int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
SWRAP_DLIST_ADD(sockets, child_si);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_SEND, NULL, 0);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_RECV, NULL, 0);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_ACK, NULL, 0);
+ if (addr != NULL) {
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_SEND, NULL, 0);
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_RECV, NULL, 0);
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_ACK, NULL, 0);
+ }
return fd;
}