Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Bug Report for SystemContractsCaller.sol #214

Open
radical13 opened this issue Feb 22, 2024 · 1 comment
Open

Script Bug Report for SystemContractsCaller.sol #214

radical13 opened this issue Feb 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@radical13
Copy link

🐛 Script Bug Report

📝 Description

The getFarCallABIWithEmptyFatPointer function in the code does not initialize the variable farCallAbiWithEmptyFatPtr before performing bitwise OR operations, which may lead to incorrect results.

🔄 Reproduction Steps

  1. Call the getFarCallABIWithEmptyFatPointer function without initializing farCallAbiWithEmptyFatPtr.
  2. Perform bitwise OR operations on farCallAbiWithEmptyFatPtr using other variables.
  3. Check the value of farCallAbiWithEmptyFatPtr after the bitwise OR operations.

🤔 Expected Behavior

The variable farCallAbiWithEmptyFatPtr should be initialized to 0 before performing bitwise OR operations.

😯 Current Behavior

The variable farCallAbiWithEmptyFatPtr is not initialized, which may result in unexpected values after performing bitwise OR operations.

🖥️ Environment

  • Solidity version: 0.8.20

📋 Additional Context

The uninitialized variable farCallAbiWithEmptyFatPtr could potentially lead to bugs or incorrect behavior in the code that uses this function. Initializing the variable to 0 before performing the bitwise OR operations would ensure that it starts with the correct value.

📎 Log Output

N/A

@radical13 radical13 added the bug Something isn't working label Feb 22, 2024
@cl3pl4t3
Copy link

In the function getFarCallABIWithEmptyFatPointer, there is a missing return statement. You need to add return farCallAbiWithEmptyFatPtr; at the end of the function to return the calculated value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants