Skip to content

Incorrect Buffer Size Passed to abi_encode() #4188

@ritzdorf

Description

@ritzdorf

Version Information

  • vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@): b43ffac

Issue Description

In external_call.py the function _pack_arguments encodes the
arguments of the call as follow:

if len(args) != 0:
    pack_args.append(abi_encode(buf + 32, args_as_tuple, context, bufsz=buflen))

However, the buffer size passed is incorrect given that buflen is the
length of the buffer allocated at buf but here the passed buffer
starts at buf + 32.

No security implications were found for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions