sherlock-audit / 2024-05-pooltogether-judging

8 stars 4 forks source link

newt - Missing Zero Address Check for _rewardRecipient #87

Closed sherlock-admin3 closed 2 months ago

sherlock-admin3 commented 3 months ago

newt

medium

Missing Zero Address Check for _rewardRecipient

Summary

In the function claimPrize, the address of the _prizeRecipient has a zero address check, However there is no zero address check the _rewardRecipient address.

Vulnerability Detail

Could lead to unexpected behavior or errors

Impact

This could lead to transaction failure or a permanent loss of funds

Code Snippet

https://github.com/sherlock-audit/2024-05-pooltogether/blob/main/pt-v5-vault/src/abstract/Claimable.sol#L76-L107

Tool used

Manual Review

Recommendation

Add a zero address check like _prizeRecipient has.

nevillehuang commented 2 months ago

Invalid, per sherlock rules

  1. Zero address checks: Check to make sure input values are not zero addresses.