diff options
-rw-r--r-- | src/util/peer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/peer.c b/src/util/peer.c index 6d7a3a654..5d54a4301 100644 --- a/src/util/peer.c +++ b/src/util/peer.c | |||
@@ -133,6 +133,7 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid) | |||
133 | } | 133 | } |
134 | if (0 == ret) | 134 | if (0 == ret) |
135 | { | 135 | { |
136 | memset (&table[0]->id, 0, sizeof (struct GNUNET_PeerIdentity)); | ||
136 | table[0]->pid = 0; | 137 | table[0]->pid = 0; |
137 | table[0]->rc = 1; | 138 | table[0]->rc = 1; |
138 | ret = 1; | 139 | ret = 1; |
@@ -243,6 +244,8 @@ GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid) | |||
243 | const struct GNUNET_PeerIdentity * | 244 | const struct GNUNET_PeerIdentity * |
244 | GNUNET_PEER_resolve2 (GNUNET_PEER_Id id) | 245 | GNUNET_PEER_resolve2 (GNUNET_PEER_Id id) |
245 | { | 246 | { |
247 | GNUNET_assert (id < size); | ||
248 | GNUNET_assert (table[id]->rc > 0); | ||
246 | return &table[id]->id; | 249 | return &table[id]->id; |
247 | } | 250 | } |
248 | 251 | ||