aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amat.us>2017-12-22 14:54:30 -0600
committerDavid Barksdale <amatus@amat.us>2017-12-22 14:54:30 -0600
commit517cf93fbd1c97a9909c6643601c8592553966bd (patch)
tree9542db1c8368439eee72214273da8ed783de6691 /src/cadet
parent311658e2bab990bbdb68607295e5a79fe082b384 (diff)
downloadgnunet-517cf93fbd1c97a9909c6643601c8592553966bd.tar.gz
gnunet-517cf93fbd1c97a9909c6643601c8592553966bd.zip
Check for invalid path_length
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet_core.c6
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,