Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/subghz/protocols/keeloq.c')
-rw-r--r--lib/subghz/protocols/keeloq.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c
index a25454be..526a6b34 100644
--- a/lib/subghz/protocols/keeloq.c
+++ b/lib/subghz/protocols/keeloq.c
@@ -264,7 +264,11 @@ bool subghz_protocol_encoder_keeloq_deserialize(void* context, FlipperFormat* fl
FURI_LOG_E(TAG, "Deserialize error");
break;
}
-
+ if(instance->generic.data_count_bit !=
+ subghz_protocol_keeloq_const.min_count_bit_for_found) {
+ FURI_LOG_E(TAG, "Wrong number of bits in key");
+ break;
+ }
subghz_protocol_keeloq_check_remote_controller(
&instance->generic, instance->keystore, &instance->manufacture_name);
@@ -656,6 +660,11 @@ bool subghz_protocol_decoder_keeloq_deserialize(void* context, FlipperFormat* fl
FURI_LOG_E(TAG, "Deserialize error");
break;
}
+ if(instance->generic.data_count_bit !=
+ subghz_protocol_keeloq_const.min_count_bit_for_found) {
+ FURI_LOG_E(TAG, "Wrong number of bits in key");
+ break;
+ }
res = true;
} while(false);