From 46afffc8bbbb4db1c3b0d4bb6fa0767db1c9bdab Mon Sep 17 00:00:00 2001 From: "Christian W. Zuckschwerdt" Date: Tue, 3 Oct 2023 13:32:00 +0200 Subject: [PATCH] Fix Somfy-IOHC length check (closes #2655) --- src/devices/somfy_iohc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/devices/somfy_iohc.c b/src/devices/somfy_iohc.c index 91f107981..ced436a65 100644 --- a/src/devices/somfy_iohc.c +++ b/src/devices/somfy_iohc.c @@ -120,6 +120,8 @@ static int somfy_iohc_decode(r_device *decoder, bitbuffer_t *bitbuffer) int msg_len = b[0] & 0x1f; if (len < msg_len + 3) return DECODE_ABORT_LENGTH; + if (msg_len < 8) + return DECODE_ABORT_LENGTH; len = msg_len + 3; int msg_end_flag = (b[0] & 0x80) >> 7;