zcash-android-wallet-sdk icon indicating copy to clipboard operation
zcash-android-wallet-sdk copied to clipboard

[SDK audit] Recommendation: Hex decoder silently ignores last character of an odd-length string

Open HonzaR opened this issue 10 months ago • 0 comments

Is your feature request related to a problem? Please describe.

The following hex decoder in BlockExt.kt will silently ignore the last character in an odd-length hex string, because of the integer division len / 2. It should instead throw an exception for odd-length strings.

Screenshot 2024-04-23 at 14 02 26

Describe the solution you'd like

Alternatives you've considered

Additional context

HonzaR avatar Apr 23 '24 12:04 HonzaR