NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

unsafe casting

Summary: Downcasting int/uints in Solidity can be unsafe due to loss of data

Vulnerability Details: in line 452 of apps/blockchain/ethereum/src/sn/Cairo.sol downcasting int/uints can lead to loss of value

Impact:medium

Tools Used:we can use openzeppelin safeCast library or use of assembly to typecast

Recommendations:Use OpenZeppelin's SafeCast library to safely downcast integers.

link to code :Link

@replace this code
-byteString[i] = bytes1(uint8(asciiValue));
@by this code
+byteString[i] = SafeCast.toUint8(asciiValue);

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.