fix: zero entire public key array instead of only first byte (#9619)
This commit is contained in:
+1
-1
@@ -1772,7 +1772,7 @@ void NodeDB::addFromContact(meshtastic_SharedContact contact)
|
||||
info->has_device_metrics = false;
|
||||
info->has_position = false;
|
||||
info->user.public_key.size = 0;
|
||||
info->user.public_key.bytes[0] = 0;
|
||||
memset(info->user.public_key.bytes, 0, sizeof(info->user.public_key.bytes));
|
||||
} else {
|
||||
/* Clients are sending add_contact before every text message DM (because clients may hold a larger node database with
|
||||
* public keys than the radio holds). However, we don't want to update last_heard just because we sent someone a DM!
|
||||
|
||||
Reference in New Issue
Block a user