diff options
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c index ae03b4f35..a67bbf445 100644 --- a/src/cadet/gnunet-service-cadet_core.c +++ b/src/cadet/gnunet-service-cadet_core.c | |||
@@ -771,6 +771,12 @@ handle_connection_create (void *cls, | |||
771 | 771 | ||
772 | options = (enum GNUNET_CADET_ChannelOption) ntohl (msg->options); | 772 | options = (enum GNUNET_CADET_ChannelOption) ntohl (msg->options); |
773 | path_length = size / sizeof (struct GNUNET_PeerIdentity); | 773 | path_length = size / sizeof (struct GNUNET_PeerIdentity); |
774 | if (0 == path_length) | ||
775 | { | ||
776 | /* bogus request */ | ||
777 | GNUNET_break_op (0); | ||
778 | return; | ||
779 | } | ||
774 | /* Initiator is at offset 0. */ | 780 | /* Initiator is at offset 0. */ |
775 | for (off=1;off<path_length;off++) | 781 | for (off=1;off<path_length;off++) |
776 | if (0 == memcmp (&my_full_id, | 782 | if (0 == memcmp (&my_full_id, |