Home / Vulnerability Database / C-sharp : Incorrect comparison with NULL
C#

C-sharp : Incorrect comparison with NULL

Classification

Overview



The application compares the object to null using Equals(). Expression obj.Equals(null) always returns false.

According to msdn, all implementations of Equals() must not throw exceptions; they should always return a value. For example, if obj is null, the Equals() method should return false instead of throwing an ArgumentNullException.

LOW

DerScanner Severity Score

Do you want to fix C-sharp : Incorrect comparison with NULL in your application?

See also

C#

C-sharp : JWT: None Algorithm

C#

C-sharp : Insecure data transmission: Database

C#

C-sharp : Only one of method Equals() and GetHashCode() defined