System information
PlatON version: platon version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)
Expected behaviour
Invalid or truncated calldata for validator inner contract calls should be rejected with a clean error before any branch reads missing arguments.
Actual behaviour
The execute path only checks that the decoded input has at least 2 items, but the UpdateValidators and SwitchValidators branches read source[2]. If the third argument is missing, the code panics and relies on the deferred recover path instead of handling the malformed input explicitly.
Steps to reproduce the behaviour
1- Call the validator inner contract with UpdateValidators or SwitchValidators.
2- Provide only two RLP items instead of three. file PlatON-Go\core\vm\validator_inner_contract.go line 186 var source [][]byte
and triggers a panic, which is then converted into an execution failure.
System information
PlatON version: platon version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop)
Expected behaviour
Invalid or truncated calldata for validator inner contract calls should be rejected with a clean error before any branch reads missing arguments.
Actual behaviour
The execute path only checks that the decoded input has at least 2 items, but the UpdateValidators and SwitchValidators branches read source[2]. If the third argument is missing, the code panics and relies on the deferred recover path instead of handling the malformed input explicitly.
Steps to reproduce the behaviour
1- Call the validator inner contract with UpdateValidators or SwitchValidators.
2- Provide only two RLP items instead of three. file PlatON-Go\core\vm\validator_inner_contract.go line 186 var source [][]byte
and triggers a panic, which is then converted into an execution failure.