Skip empty anon contact slots in peer/contact lookups (prevent null-key ECDH sink)
This commit is contained in:
1 parent
c9fa617c38
commit
adb01c473e
3 files changed
+245
-1
No files matched your search
@@ -31,6 +31,12 @@ struct ContactInfo {
|
||||
bool isTelemLocAllowed() const { return flags & 0x04; }
|
||||
bool isTelemEnvAllowed() const { return flags & 0x08; }
|
||||
bool isRemoteCLIAllowed() const { return flags & 0x10; }
|
||||
bool isEmptySlot() const {
|
||||
for (int i = 0; i < PUB_KEY_SIZE; i++) {
|
||||
if (id.pub_key[i] != 0) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
mutable uint8_t shared_secret[PUB_KEY_SIZE];
|
||||
|
||||
Reference in new issue
Block a user