-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
fix[codegen]: fix _abi_decode
buffer overflow
#3925
fix[codegen]: fix _abi_decode
buffer overflow
#3925
Conversation
TODO: we should likely add a check that the element pointed to by |
also, looking at the code, i think there's a possibility for double eval of |
yeah, looks like double eval
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3925 +/- ##
==========================================
- Coverage 91.04% 87.94% -3.10%
==========================================
Files 107 106 -1
Lines 15422 15325 -97
Branches 3389 3152 -237
==========================================
- Hits 14041 13478 -563
- Misses 947 1314 +367
- Partials 434 533 +99 ☔ View full report in Codecov by Sentry. |
another example in case you want more tests there: @external
def bar() -> (uint256, uint256, uint256):
return (480, 0, 0)
interface A:
def bar() -> String[32]: nonpayable
@internal
def internal_func():
# in this case we extcall ourself for the sake of the POC but it could be any other contract
x:String[32] = extcall A(self).bar()
print(x) # prints "oooops"
@external
def foo():
w:String[8] = "oooops"
self.internal_func() |
make_setter can call identity precompile
this is more or less ready for review, @cyberthirst to add more tests |
_abi_decode
overflow
_abi_decode
overflow_abi_decode
buffer overflow
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.
nice work. thanks!
What I did
How I did it
head
points within the parent boundsHow to verify it
Commit message
Description for the changelog
Cute Animal Picture