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

Multiple swarm hashes can result in endless loop #48

Open
f0rki opened this issue May 8, 2019 · 0 comments
Open

Multiple swarm hashes can result in endless loop #48

f0rki opened this issue May 8, 2019 · 0 comments

Comments

@f0rki
Copy link

f0rki commented May 8, 2019

Currently there is a possible infinite loop when multiple swarm hashes are in the bytecode. I think the Problem is in evm.py#L373

Currently the line is:

offset = data[offset+1:].find(b'\xa1ebzzr0')

However, here find will return the offset in the string slice and not in the original data, so it is possible for the next offset to be smaller than the previous offset.

Replacing that line with

offset = data.find(b'\xa1ebzzr0', offset + 1)

seems to fix the problem.

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

1 participant