mirror of
https://github.com/Qyriad/fusee-launcher.git
synced 2024-11-21 22:59:18 +01:00
add payload size check
This commit is contained in:
parent
620a89471f
commit
e7b42b9279
@ -474,6 +474,10 @@ payload_length = len(payload)
|
||||
padding_size = 0x1000 - (payload_length % 0x1000)
|
||||
payload += (b'\0' * padding_size)
|
||||
|
||||
if len(payload) > length:
|
||||
print("ERROR: Too large payload! (%x vs %x)" % (len(payload), length))
|
||||
sys.exit(-2)
|
||||
|
||||
# Send the constructed payload, which contains the command, the stack smashing
|
||||
# values, the Intermezzo relocation stub, and the final payload.
|
||||
print("Uploading payload...")
|
||||
|
Loading…
Reference in New Issue
Block a user