Skip to content

Commit 31dab1e

Browse files
committed
fix: Add missing zero length termination
1 parent baed24d commit 31dab1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contracts/lib/ExitPayloadReader.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ library ExitPayloadReader {
4444
src += WORD_SIZE;
4545
dest += WORD_SIZE;
4646
}
47+
48+
if (len == 0) return;
4749

4850
// left over bytes. Mask is used to remove unwanted bytes from the word
4951
uint256 mask = 256**(WORD_SIZE - len) - 1;

0 commit comments

Comments
 (0)