From 5882a3a56708bf058e918166af9f2c4df66e2e29 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 20 Aug 2022 14:41:22 +0200 Subject: -fix off-by-one on path truncation --- src/dht/gnunet-service-dht_neighbours.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dht') diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 8611f2653..376ac5092 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c @@ -2083,7 +2083,7 @@ handle_dht_p2p_put (void *cls, failure_offset); GNUNET_assert (failure_offset <= putlen + 1); bd.put_path = &pp[failure_offset]; - bd.put_path_length = putlen - failure_offset; + bd.put_path_length = (putlen + 1) - failure_offset; bd.ro |= GNUNET_DHT_RO_TRUNCATED; bd.trunc_peer = pp[failure_offset - 1].pred; } -- cgit v1.2.3