From e775358a077058e9d5643db3cf54b0b7a941bd26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20D=C3=A9saulniers?= <sim.desaulniers@gmail.com> Date: Mon, 20 Jun 2016 14:05:39 -0400 Subject: [PATCH] pht: validKey must check for key field value len --- include/opendht/indexation/pht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/opendht/indexation/pht.h b/include/opendht/indexation/pht.h index 92328703..23d5a5fa 100644 --- a/include/opendht/indexation/pht.h +++ b/include/opendht/indexation/pht.h @@ -246,7 +246,7 @@ private: return k.size() == keySpec_.size() and std::equal(k.begin(), k.end(), keySpec_.begin(), [&](const Key::value_type& key, const KeySpec::value_type& key_spec) { - return key.first == key_spec.first; + return key.first == key_spec.first and key.second.size() <= key_spec.second; } ); } -- GitLab