From 7d1afa9b41eb36d2e437149dda5dc5b3e6b8ae7c Mon Sep 17 00:00:00 2001 From: arvidn Date: Tue, 30 Apr 2019 09:11:00 +0200 Subject: [PATCH] fix assert in DHT node --- src/kademlia/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kademlia/node.cpp b/src/kademlia/node.cpp index a85ae5974..e89209a50 100644 --- a/src/kademlia/node.cpp +++ b/src/kademlia/node.cpp @@ -259,7 +259,7 @@ void node::incoming(aux::listen_socket_handle const& s, msg const& m) { // is this a reply? bdecode_node const y_ent = m.message.dict_find_string("y"); - if (!y_ent || y_ent.string_length() == 0) + if (!y_ent || y_ent.string_length() != 1) { // don't respond to this obviously broken messages. We don't // want to open up a magnification opportunity