Skip to content

Commit

Permalink
Fix Somfy-IOHC length check (closes #2655)
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckschwerdt committed Oct 3, 2023
1 parent e2f8d62 commit 46afffc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/devices/somfy_iohc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 46afffc

Please sign in to comment.