diff --git a/src/infuse_iot/cpatch.py b/src/infuse_iot/cpatch.py index e032c5b..0fc1c15 100644 --- a/src/infuse_iot/cpatch.py +++ b/src/infuse_iot/cpatch.py @@ -506,7 +506,7 @@ def _naive_diff(cls, old: bytes, new: bytes, hash_len: int = 8): # Pre-hash original image pre_hash = {} prev_val = None - for offset in range(len(old) - hash_len): + for offset in range(len(old) - hash_len + 1): val = old[offset : offset + hash_len] if val == prev_val: continue