-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boundaries check fixes #228
Conversation
147ba77
to
f24d137
Compare
f24d137
to
de1f009
Compare
5f279ae
to
48d8b99
Compare
9f813a7
to
86bc611
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😸
; if offset is lower than calldata length, return 0 | ||
$ :LT,JMPC(CALLDATALOADreturn0) | ||
B => E | ||
$ => A :MLOAD(SP); [offset => B] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
offset => B
-> offset => A
@@ -94,7 +94,7 @@ opCALLDATACOPY: | |||
; check stack underflow | |||
SP - 3 => SP :JMPN(stackUnderflow) | |||
$ => E :MLOAD(SP+2); [destOffset => E] | |||
$ => B :MLOAD(SP+1); [offset => B] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
offset => B
-> offset => A
Audit fixes:
offsetUtil
functiontmpVarBoffsetUtil
inoffsetUtil
functionoutOfGas
instead ofhandleError
inerrorMLOADMSTORE