mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-07 16:17:38 +03:00
Fix MAC address buffer size to avoid potential truncation
Co-authored-by: lukestein <44452336+lukestein@users.noreply.github.com>
This commit is contained in:
parent
f047e54262
commit
d5e1f30434
@ -449,7 +449,7 @@ std::string WifiSelectionActivity::getMacAddressString() const {
|
|||||||
uint8_t mac[6];
|
uint8_t mac[6];
|
||||||
WiFi.macAddress(mac);
|
WiFi.macAddress(mac);
|
||||||
|
|
||||||
char macStr[24];
|
char macStr[32];
|
||||||
snprintf(macStr, sizeof(macStr), "MAC address: %02X-%02X-%02X-%02X-%02X-%02X",
|
snprintf(macStr, sizeof(macStr), "MAC address: %02X-%02X-%02X-%02X-%02X-%02X",
|
||||||
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user