Skip to content

Commit 4b303e0

Browse files
authored
Merge pull request #2356 from OffchainLabs/l2msg_length
MessageFromTxes: check l2message length
2 parents d5ca4bf + f88c333 commit 4b303e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

execution/gethexec/executionengine.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ func MessageFromTxes(header *arbostypes.L1IncomingMessageHeader, txes types.Tran
234234
l2Message = append(l2Message, txBytes...)
235235
}
236236
}
237+
if len(l2Message) > arbostypes.MaxL2MessageSize {
238+
return nil, errors.New("l2message too long")
239+
}
237240
return &arbostypes.L1IncomingMessage{
238241
Header: header,
239242
L2msg: l2Message,

0 commit comments

Comments
 (0)