Merge pull request #1245 from majonezz/patch-1

Avoid SIGSEGV in WMBusCUL::checkCULFrame
pull/949/merge
Fredrik Öhrström 2024-04-14 16:13:26 +02:00 zatwierdzone przez GitHub
commit 14d021426a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -331,6 +331,7 @@ FrameStatus WMBusCUL::checkCULFrame(vector<uchar> &data,
string s = safeString(hex_buffer);
debug("(cul) bad hex for LQI and RSSI \"%s\"\n", s.c_str());
warning("(cul) warning: the LQI and RSSI hex string is not properly formatted!\n");
return ErrorInFrame;
}
// LQI is 7 bits unsigned number and relative - range 0-127 lower is better
uint lqi = lqi_rssi[0]>>1;