mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
Fix buffer overflow
This commit is contained in:
parent
35e570ca97
commit
2fe5326821
@ -427,7 +427,7 @@ void HM10parseMiBeacon(char * _buf, uint32_t _slot){
|
||||
float _tempFloat;
|
||||
mi_beacon_t _beacon;
|
||||
if (MIBLEsensors[_slot].type==MJ_HT_V1 || MIBLEsensors[_slot].type==CGG1){
|
||||
memcpy((uint8_t*)&_beacon+1,(uint8_t*)_buf, sizeof(_beacon)); // shift by one byte for the MJ_HT_V1
|
||||
memcpy((uint8_t*)&_beacon+1,(uint8_t*)_buf, sizeof(_beacon)-1); // shift by one byte for the MJ_HT_V1
|
||||
memcpy((uint8_t*)&_beacon.Mac,(uint8_t*)&_beacon.Mac+1,6); // but shift back the MAC
|
||||
}
|
||||
else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user