diff options
author | Christian Pointner <equinox@anytun.org> | 2009-02-26 15:30:43 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-02-26 15:30:43 +0000 |
commit | 36100bab1077e30ea3e9cd041d3ce4276ced234d (patch) | |
tree | 44eee903bdcdbcee786816b47bb11888977a37ab /src | |
parent | removed not working setsockopt V6ONLY (diff) |
added additional security check in case remote address is not set
Diffstat (limited to 'src')
-rw-r--r-- | src/udp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -220,7 +220,7 @@ int udp_read(udp_socket_t* sock, u_int8_t* buf, u_int32_t len, udp_endpoint_t* r int udp_write(udp_socket_t* sock, u_int8_t* buf, u_int32_t len) { - if(!sock) + if(!sock || !sock->remote_end_set_) return -1; socklen_t socklen = sizeof(sock->remote_end_); |