mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
routing: fix hash of pubkeys.
Found by PVS Studio. Reported-by: Jon Griffiths <jgriffiths@blockstream.io> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -21,7 +21,7 @@ static const secp256k1_pubkey *keyof_node(const struct node *n)
|
|||||||
|
|
||||||
static size_t hash_key(const secp256k1_pubkey *key)
|
static size_t hash_key(const secp256k1_pubkey *key)
|
||||||
{
|
{
|
||||||
return siphash24(siphash_seed(), key, sizeof(key));
|
return siphash24(siphash_seed(), key, sizeof(*key));
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool node_eq(const struct node *n, const secp256k1_pubkey *key)
|
static bool node_eq(const struct node *n, const secp256k1_pubkey *key)
|
||||||
|
|||||||
Reference in New Issue
Block a user