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

error in copyBytes function #1

Open
samanshahmohamadi opened this issue Dec 23, 2018 · 1 comment
Open

error in copyBytes function #1

samanshahmohamadi opened this issue Dec 23, 2018 · 1 comment

Comments

@samanshahmohamadi
Copy link

Hi
There is a syntax error in copyBytes function (lines 91-93).
This piece of code is not compiled:

assembly {
        add(minLength, toOffset)
        to
        mstore
      }
@D-Nice
Copy link
Owner

D-Nice commented Dec 23, 2018

Hi

The piece of code is compiled, however, the assembly does make presumptions on the memory layout, and is targetted at solc 0.4.15. I tested this as working up till 0.4.21. Beyond 0.4.22 there were memory layout changes, so assembly code that plays with memory, likely broke. I would have to investigate which code is the culprit in fact, whether it's the hmac or sha1 code, and then look to appropriately update it to work with up to 0.4.25.

Is this something you need for a project or were just randomly trying. I'm looking to gauge and get an idea of the importance of this so I can decide how much time to invest into this.

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

No branches or pull requests

2 participants