You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not return empty calldata in raw_call. Fixes#1976
How I did it
Compare RETURNDATASIZE to outsize and copy the smaller number of bytes to memory.
How to verify it
Run tests. I added / updated some cases. I also had to adjust some failing ones in test_wallet where the spirit of the test was that the call should succeed, but there was a check that it returned a non-empty value. Because of this change the value is now empty.
Ok I think I understand it now. It's important for variable length return data. I think it is a good change, but using the name outsize is confusing because it suggests the length of the output will be that size. We could rename it to bufsize or max_outsize.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Do not return empty calldata in
raw_call. Fixes #1976How I did it
Compare
RETURNDATASIZEtooutsizeand copy the smaller number of bytes to memory.How to verify it
Run tests. I added / updated some cases. I also had to adjust some failing ones in
test_walletwhere the spirit of the test was that the call should succeed, but there was a check that it returned a non-empty value. Because of this change the value is now empty.Cute Animal Picture