Fix warnings with `cyclic --n 4 --detect` on 64 bit host (#3288)

pull/3292/head
peace-maker 3 months ago committed by GitHub
parent 4dd7300a50
commit 2195afbc33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -49,7 +49,7 @@ def detect_register_patterns(alphabet, length, timeout) -> None:
try: try:
signal.alarm(timeout) signal.alarm(timeout)
value_bytes = value.to_bytes(ptr_size, endian) value_bytes = value.to_bytes(ptr_size, endian)
offset = cyclic_find(value_bytes, alphabet=alphabet, n=length) offset = cyclic_find(value_bytes[:length], alphabet=alphabet, n=length)
if offset != -1: if offset != -1:
found_patterns.append((reg_name, value, offset)) found_patterns.append((reg_name, value, offset))
except TimeoutException: except TimeoutException:

Loading…
Cancel
Save