CWE-482

Comparing instead of Assigning

Medium

Description

The code uses an operator for comparison when the intention was to perform an assignment.

Potential Impact

How to Fix

Testing

Many IDEs and static analysis products will detect this problem.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-482 vulnerabilities in your codebase.

Get Security Assessment