From db28465e0c8b30cb7d5e4e9636d4b7a10793656c Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 6 Apr 2024 21:35:15 +0200 Subject: if copying seeders from behind, use compare_size to advance pointer --- trackerlogic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackerlogic.c b/trackerlogic.c index b52b478..5e32f13 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -215,7 +215,7 @@ static size_t return_peers_all( ot_peerlist *peer_list, size_t peer_size, char * size_t peer_count = bucket_list[bucket].size; while( peer_count-- ) { if( OT_PEERFLAG_D(peers, peer_size) & PEER_FLAG_SEEDING ) { - r_end -= peer_size; + r_end -= compare_size; memcpy( r_end, peers, compare_size); } else { memcpy( reply, peers, compare_size ); -- cgit v1.2.3