Puzzle 5
MSIZE
Puzzle
Solution
Chunk 1
The calldata must be longer than 0x20 = 32
bytes.
Chunk 2
Pseudocode:
MSIZE
gets the size of active memory in bytes. More importantly, from evm.codes:
At address 0x0E
when CALLDATACOPY
is called, our calldata is copied to the memory. If our calldata is longer than 32 bytes but shorter than 64 bytes, then MSIZE
will always return 64. To satisfy memory_size - calldata_size == 0x03
, we can just feed 61 0x00
as calldata. In Python:
Last updated