Skip to content

Commit

Permalink
Fix dangling data in container for initcode
Browse files Browse the repository at this point in the history
  • Loading branch information
shemnon committed Sep 17, 2024
1 parent 12bcb49 commit 4392a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/vm/eof.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (c *Container) unmarshalContainer(b []byte, isInitcode bool, topLevel bool)
return fmt.Errorf("%w: have %d, want %d", ErrInvalidContainerSize, len(b), expectedSize)
}
// Only check that the expected size is not exceed on non-initcode
if !isInitcode && len(b) > expectedSize {
if (!topLevel || !isInitcode) && len(b) > expectedSize {
return fmt.Errorf("%w: have %d, want %d", ErrInvalidContainerSize, len(b), expectedSize)
}

Expand Down

0 comments on commit 4392a1c

Please sign in to comment.