code-423n4 / 2021-08-gravitybridge-findings

1 stars 0 forks source link

Skip functionCall when the payload is empty #29

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

You may want to consider calling logicContractAddress only when the payload is not empty: bytes memory returnData = Address.functionCall(_args.logicContractAddress, _args.payload);

Recommended Mitigation Steps

You can do the external call only if _args.payload is not empty.

jkilpatr commented 2 years ago

I would classify this as a gas optimization. Otherwise good.

loudoguno commented 2 years ago

reopening as per judges assessment as "primary issue" on findings sheet