Skip to content

Add execution return value length check#4802

Merged
envestcc merged 2 commits intoiotexproject:masterfrom
envestcc:fix/retval
Mar 17, 2026
Merged

Add execution return value length check#4802
envestcc merged 2 commits intoiotexproject:masterfrom
envestcc:fix/retval

Conversation

@envestcc
Copy link
Member

Description

This pull request makes a minor update to the revert message handling logic in the ExecuteContract function. The change ensures that the code safely checks the length of the retval before accessing its first four bytes, preventing potential runtime errors.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update
  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

@envestcc envestcc requested a review from a team as a code owner March 12, 2026 00:20
@sonarqubecloud
Copy link

@envestcc envestcc merged commit 07633c8 into iotexproject:master Mar 17, 2026
4 checks passed
@envestcc envestcc deleted the fix/retval branch March 17, 2026 07:00
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

Successfully merging this pull request may close these issues.

2 participants