1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

add extra check

This commit is contained in:
MX
2025-10-21 04:22:09 +03:00
parent 3e96806962
commit a553bc2f57

View File

@@ -379,6 +379,9 @@ SubGhzProtocolStatus
}
if(instance->generic.data_count_bit != 64) {
if(instance->generic.data_count_bit < 62) {
return SubGhzProtocolStatusErrorValueBitCount;
}
// Removing possible artifacts from higher bits and setting header to FF FE
instance->generic.data =
((((((0xFF << 16) | ((instance->generic.data >> 40) & 0xFFFF)) << 16) |