Avoid buffer overflow
This commit is contained in:
parent
204b91237c
commit
334a23a8e2
@ -70,7 +70,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (added) { // first time seen this WIFI or BLE MAC
|
if (added) { // first time seen this WIFI or BLE MAC
|
||||||
snprintf(counter, sizeof(counter), "%d", (int) macs.size()); // convert 16-bit MAC counter to decimal counter value
|
snprintf(counter, sizeof(counter), "%d", (uint16_t) macs.size()); // convert 16-bit MAC counter to decimal counter value
|
||||||
u8x8.draw2x2String(0, 0, counter); // display number on unique macs total Wifi + BLE
|
u8x8.draw2x2String(0, 0, counter); // display number on unique macs total Wifi + BLE
|
||||||
ESP_LOGI(TAG, "%s RSSI %d -> Hash %04X -> WiFi:%d BLE:%d Tot:%d",
|
ESP_LOGI(TAG, "%s RSSI %d -> Hash %04X -> WiFi:%d BLE:%d Tot:%d",
|
||||||
typebuff, rssi, hashedmac,
|
typebuff, rssi, hashedmac,
|
||||||
|
Loading…
Reference in New Issue
Block a user