summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-26 15:30:43 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-26 15:30:43 +0000
commit36100bab1077e30ea3e9cd041d3ce4276ced234d (patch)
tree44eee903bdcdbcee786816b47bb11888977a37ab /src
parentremoved 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udp.c b/src/udp.c
index 753e8ac..96e2e23 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -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_);