aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-20 14:41:22 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-20 14:41:22 +0200
commit5882a3a56708bf058e918166af9f2c4df66e2e29 (patch)
tree2f5609d38f5f2cbb9924a14be82a4d3a9e2cd3a5 /src/dht/gnunet-service-dht_neighbours.c
parent5a8b9a11a3050c91d99b43e4b2635d508385fc54 (diff)
downloadgnunet-5882a3a56708bf058e918166af9f2c4df66e2e29.tar.gz
gnunet-5882a3a56708bf058e918166af9f2c4df66e2e29.zip
-fix off-by-one on path truncation
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c2
1 files changed, 1 insertions, 1 deletions
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,
2083 failure_offset); 2083 failure_offset);
2084 GNUNET_assert (failure_offset <= putlen + 1); 2084 GNUNET_assert (failure_offset <= putlen + 1);
2085 bd.put_path = &pp[failure_offset]; 2085 bd.put_path = &pp[failure_offset];
2086 bd.put_path_length = putlen - failure_offset; 2086 bd.put_path_length = (putlen + 1) - failure_offset;
2087 bd.ro |= GNUNET_DHT_RO_TRUNCATED; 2087 bd.ro |= GNUNET_DHT_RO_TRUNCATED;
2088 bd.trunc_peer = pp[failure_offset - 1].pred; 2088 bd.trunc_peer = pp[failure_offset - 1].pred;
2089 } 2089 }