Skip to content

Price for OpCode.SYSCALL can be zero #1911

@Qiao-Jin

Description

@Qiao-Jin

Summary or problem description
In Func ApplicationEngine.UpdateContract

AddGas(StoragePrice * (script?.Length ?? 0 + manifest?.Length ?? 0));

Here input of func AddGas can be zero, when both script and manifest is null or with 0 length.

Such script and manifest is also unreasonable.

Do you have any solution you want to propose?
Suggest change: throw exception for such script or manifest like here:

if (script.Length == 0 || script.Length > MaxContractLength)

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • VM

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionInitial issue state - proposed but not yet accepted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions