fix off-by-one
authorChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 19:24:41 +0000 (20:24 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 22 Jan 2017 19:24:41 +0000 (20:24 +0100)
src/cadet/gnunet-service-cadet-new_paths.c

index 0fb558d81f4445a51c2c7248281e96c13021ed58..976020bea0d1a32e14b24b82476eda99beecb39b 100644 (file)
@@ -217,7 +217,7 @@ GCPP_release (struct CadetPeerPath *path)
     entry = path->entries[path->entries_length - 1];
     path->hn = GCP_attach_path (entry->peer,
                                 path,
-                                path->entries_length,
+                                path->entries_length - 1,
                                 GNUNET_NO);
     if (NULL != path->hn)
       return; /* yep, got attached, we are done. */