core: Fix telemetry ID personalization array size

- The personalization array in GenerateTelemetryId() was too small (18 bytes)
  for the string "citron Telemetry ID" which requires 20 bytes including the
  null terminator
- Increased the array size to 20 to properly accommodate the full string
This commit is contained in:
Zephyron 2024-12-31 17:33:34 +10:00
parent b3facaa6bb
commit c972c5129d
No known key found for this signature in database
GPG key ID: 8DA271B6A74353F1

View file

@ -35,7 +35,7 @@ static u64 GenerateTelemetryId() {
mbedtls_entropy_context entropy;
mbedtls_entropy_init(&entropy);
mbedtls_ctr_drbg_context ctr_drbg;
static constexpr std::array<char, 18> personalization{{"citron Telemetry ID"}};
static constexpr std::array<char, 20> personalization{{"citron Telemetry ID"}};
mbedtls_ctr_drbg_init(&ctr_drbg);
ASSERT(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,