aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-01-25 15:02:55 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-01-25 15:02:55 +0000
commitefb4b8bd6b8de4339a086dedec490dc3f01e8d5f (patch)
tree3435074b8d3b8935923f7723c23437cfbabbc468 /src/transport/plugin_transport_http.c
parent2485b15112d08de613f373ce9ba3f451a53677b2 (diff)
downloadgnunet-efb4b8bd6b8de4339a086dedec490dc3f01e8d5f.tar.gz
gnunet-efb4b8bd6b8de4339a086dedec490dc3f01e8d5f.zip
- clang
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r--src/transport/plugin_transport_http.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index d993edb6b..0bfa82123 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -181,7 +181,7 @@ http_plugin_address_pretty_printer (void *cls, const char *type,
181 size_t sbs; 181 size_t sbs;
182 uint16_t port = 0; 182 uint16_t port = 0;
183 183
184 if (addrlen == sizeof (struct IPv6HttpAddress)) 184 if ((addrlen == sizeof (struct IPv6HttpAddress)) && (addr != NULL))
185 { 185 {
186 struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) addr; 186 struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) addr;
187 s6.sin6_family = AF_INET6; 187 s6.sin6_family = AF_INET6;
@@ -195,7 +195,7 @@ http_plugin_address_pretty_printer (void *cls, const char *type,
195 port = ntohs (a6->u6_port); 195 port = ntohs (a6->u6_port);
196 196
197 } 197 }
198 else if (addrlen == sizeof (struct IPv4HttpAddress)) 198 else if ((addrlen == sizeof (struct IPv4HttpAddress)) && (addr != NULL))
199 { 199 {
200 struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) addr; 200 struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) addr;
201 201
@@ -607,7 +607,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
607#endif 607#endif
608 int res = GNUNET_OK; 608 int res = GNUNET_OK;
609 struct GNUNET_ATS_Information ats; 609 struct GNUNET_ATS_Information ats;
610 if (addrlen == sizeof (struct IPv4HttpAddress)) 610 if ((addrlen == sizeof (struct IPv4HttpAddress)) && (addr != NULL))
611 { 611 {
612 struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) addr; 612 struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) addr;
613 struct sockaddr_in s4; 613 struct sockaddr_in s4;
@@ -623,7 +623,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
623 if ((ntohs (a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO)) 623 if ((ntohs (a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
624 res = GNUNET_SYSERR; 624 res = GNUNET_SYSERR;
625 } 625 }
626 if (addrlen == sizeof (struct IPv6HttpAddress)) 626 if ((addrlen == sizeof (struct IPv6HttpAddress)) && (addr != NULL))
627 { 627 {
628 struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) addr; 628 struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) addr;
629 struct sockaddr_in6 s6; 629 struct sockaddr_in6 s6;