starkbank / ecdsa-dotnet

A lightweight and fast pure C# ECDSA library
https://starkbank.com
Other
49 stars 20 forks source link

Short-circuit logic should be used in boolean contexts #8

Closed abidon closed 4 years ago

abidon commented 4 years ago

Hello,

We use Sonarqube on our projects to detect code smells and security issues. It found a problem in the binary.cs file (line33).

https://github.com/starkbank/ecdsa-dotnet/blob/c3802aa9dd604a9639f3340f97165cfd1ea27476/EcdsaDotNet/EcdsaDotNet/utils/binary.cs#L32-L35

Here is a link to a public Sonarqube instance (not ours) which details the problem and a link to a detailed explaination of why this is an issue.

Hope it helps, Aurélien