ERC7579.decodeBatch: Perform sanity check if executionCalldata is not at the end of allocated calldata#5400
ERC7579.decodeBatch: Perform sanity check if executionCalldata is not at the end of allocated calldata#5400Amxx wants to merge 14 commits intoOpenZeppelin:masterfrom
Conversation
🦋 Changeset detectedLatest commit: e1fdeeb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR implements a patch fix for ERC7579Utils.decodeBatch to address potential calldata boundary validation issues. The changes introduce memory-safe buffer pointer extraction by populating bufferPtr and bufferLength from input calldata instead of using executionCalldata.offset directly. A new private helper function Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/brown-jokes-applaud.md:
- Line 5: The changeset line currently misstates the behavior for ERC7579Utils;
update the entry text so it says the deep sanity check runs when
executionCalldata is not the last buffer in calldata (instead of saying it is
the last). Edit the .changeset/brown-jokes-applaud.md entry and replace the
sentence with a clear phrasing such as: "ERC7579Utils: Add in-depth sanity check
when executionCalldata is not the last buffer in calldata." to match the
implemented condition.
ℹ️ Review info
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/brown-jokes-applaud.mdcontracts/account/utils/draft-ERC7579Utils.soltest/account/utils/draft-ERC7579Utils.t.sol
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Fixes #5395
PR Checklist
npx changeset add)