Fix Somfy-IOHC length check (closes #2655)

This commit is contained in:
Christian W. Zuckschwerdt
2023-10-03 13:32:00 +02:00
parent e2f8d6275f
commit 46afffc8bb

View File

@@ -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;