projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a8ea46
)
fix access before null check
author
Matthias Wachs
<wachs@net.in.tum.de>
Mon, 13 Feb 2012 13:27:25 +0000
(13:27 +0000)
committer
Matthias Wachs
<wachs@net.in.tum.de>
Mon, 13 Feb 2012 13:27:25 +0000
(13:27 +0000)
src/transport/plugin_transport_tcp.c
patch
|
blob
|
history
diff --git
a/src/transport/plugin_transport_tcp.c
b/src/transport/plugin_transport_tcp.c
index 6ee14d026da4090da0e85018f9d83b88e269f179..eedb9f910c16b80056077c952132af2fe3d08657 100644
(file)
--- a/
src/transport/plugin_transport_tcp.c
+++ b/
src/transport/plugin_transport_tcp.c
@@
-1313,11
+1313,13
@@
tcp_plugin_get_session (void *cls,
const struct IPv4TcpAddress *t4;
const struct IPv6TcpAddress *t6;
unsigned int is_natd = GNUNET_NO;
- size_t addrlen =
address->address_length
;
+ size_t addrlen =
0
;
GNUNET_assert (plugin != NULL);
GNUNET_assert (address != NULL);
+ addrlen = address->address_length;
+
if (addrlen == sizeof (struct IPv6TcpAddress))
{
GNUNET_assert (NULL != address->address); /* make static analysis happy */