mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-27 01:07:15 +02:00
Fix possible string overflow in BTAdvertisedDeviceSet::toString()
This commit is contained in:
@ -47,8 +47,8 @@ std::string BTAdvertisedDeviceSet::toString() {
|
||||
res += val;
|
||||
}
|
||||
if (haveRSSI()) {
|
||||
char val[4];
|
||||
snprintf(val, sizeof(val), "%d", getRSSI());
|
||||
char val[6];
|
||||
snprintf(val, sizeof(val), "%d", (int8_t)getRSSI());
|
||||
res += ", rssi: ";
|
||||
res += val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user