Browse Source

set only key correctly

pull/1499/head
orignal 5 years ago
parent
commit
ff19bab800
  1. 2
      libi2pd_client/I2CP.cpp

2
libi2pd_client/I2CP.cpp

@ -572,7 +572,7 @@ namespace client @@ -572,7 +572,7 @@ namespace client
uint16_t keyType = bufbe16toh (buf + offset); offset += 2; // encryption type
uint16_t keyLen = bufbe16toh (buf + offset); offset += 2; // private key length
if (offset + keyLen > len) return;
if (keyType > currentKeyType)
if (!currentKey || keyType > currentKeyType)
{
currentKeyType = keyType;
currentKey = buf + offset;

Loading…
Cancel
Save