fix(contacts): zero ContactInfo before a partial fill

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5 committed 2026-08-19 12:27:43 +02:00
1 parent cb74cdee06
commit e06d95ed22
3 files changed
+17

No files matched your search

+4
View File
@@ -103,6 +103,10 @@ class MyMesh : public BaseChatMesh, ContactVisitor {
uint8_t unused;
uint32_t reserved;
// No shared_secret/shared_secret_valid in the on-disk record; without
// this the flag is indeterminate for every contact loaded at boot.
memset(&c, 0, sizeof(c));
bool success = (file.read(pub_key, 32) == 32);
success = success && (file.read((uint8_t *) &c.name, 32) == 32);
success = success && (file.read(&c.type, 1) == 1);