Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Multiple swarm hashes can result in endless loop #48

Description

@f0rki

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions