Skip to content

Commit

Permalink
fix: length check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernst79 committed Aug 23, 2022
1 parent cdb8ead commit 9817c84
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bthome_ble/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,10 @@ def _parse_bthome(
return False

payload_length = len(payload)
payload_start = 0
next_start = 0
result = False

while payload_length >= payload_start + 1:
while payload_length >= next_start + 1:
payload_start = next_start

obj_control_byte = payload[payload_start]
Expand Down

0 comments on commit 9817c84

Please sign in to comment.