Skip to content
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) Removing usage of a free pointer from EternalStorageProxy's fallback function #151

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

varasev
Copy link
Contributor

@varasev varasev commented Jul 26, 2018

(Mandatory) Description

Using 0 instead of ptr is safe as it is described in zeppelinos/zos-lib#70:

  1. Nothing can happen after the inline assembly block. It always runs return or revert, and both of them stop the EVM execution. So the ABI doesn't need to be followed after the assembly block.
  2. The proxied contract uses a new address space after the delegatecall, so we can do whatever we want with the proxy's one.

I've tested the work of upgradable smart contracts after these changes by unit tests and scripts/migrate/migrateAll.js - the contracts work fine.

(Mandatory) What is it: (Fix), (Feature), or (Refactor)
(Fix)

@varasev varasev merged commit 5d1a21a into poanetwork:security-audit Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant