aboutsummaryrefslogtreecommitdiff
path: root/src/set
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2014-05-26 09:32:54 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2014-05-26 09:32:54 +0000
commit661e811fef7d0ef6b62892a87ec3723edb0ca3bc (patch)
tree205f517bc334ef48e34af8d6131b248080acd214 /src/set
parent5383f4e6dc8b43519d3ef5a28606fbca066d597a (diff)
downloadgnunet-661e811fef7d0ef6b62892a87ec3723edb0ca3bc.tar.gz
gnunet-661e811fef7d0ef6b62892a87ec3723edb0ca3bc.zip
- fixed bug in set which allows a peer to generate a malformed session setup
- fixed double-cancel of a set-handle
Diffstat (limited to 'src/set')
-rw-r--r--src/set/gnunet-service-set_intersection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/set/gnunet-service-set_intersection.c b/src/set/gnunet-service-set_intersection.c
index 9b327ec78..4709e3d82 100644
--- a/src/set/gnunet-service-set_intersection.c
+++ b/src/set/gnunet-service-set_intersection.c
@@ -748,6 +748,11 @@ handle_p2p_element_info (void *cls, const struct GNUNET_MessageHeader *mh)
748 GNUNET_break_op (0); 748 GNUNET_break_op (0);
749 fail_intersection_operation(op); 749 fail_intersection_operation(op);
750 } 750 }
751
752 if (0 == op->state->my_element_count) {
753 send_peer_done (op);
754 return;
755 }
751 756
752 op->state->phase = PHASE_BF_EXCHANGE; 757 op->state->phase = PHASE_BF_EXCHANGE;
753 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES); 758 op->state->my_elements = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_YES);
@@ -758,7 +763,7 @@ handle_p2p_element_info (void *cls, const struct GNUNET_MessageHeader *mh)
758 763
759 GNUNET_CONTAINER_bloomfilter_free (op->state->remote_bf); 764 GNUNET_CONTAINER_bloomfilter_free (op->state->remote_bf);
760 op->state->remote_bf = NULL; 765 op->state->remote_bf = NULL;
761 766
762 if (op->state->my_element_count == ntohl (msg->sender_element_count)) 767 if (op->state->my_element_count == ntohl (msg->sender_element_count))
763 op->state->phase = PHASE_MAYBE_FINISHED; 768 op->state->phase = PHASE_MAYBE_FINISHED;
764 769