[Forgot Password]
Login  Register Subscribe

30479

 
 

423868

 
 

250770

 
 

909

 
 

196157

 
 

282

Paid content will be excluded from the download.


Download | Alert*
CWE
view XML

Expression is Always True

ID: 571Date: (C)2012-05-14   (M)2022-10-10
Type: weaknessStatus: DRAFT
Abstraction Type: Variant





Description

The software contains an expression that will always evaluate to true.

Applicable Platforms
Language Class: All

Time Of Introduction

  • Implementation

Common Consequences

ScopeTechnical ImpactNotes
Other
 
Quality degradation
Varies by context
 
 

Detection Methods
None

Potential Mitigations

PhaseStrategyDescriptionEffectivenessNotes
Testing
 
 Use Static Analysis tools to spot such conditions.
 
  

Relationships

Related CWETypeViewChain
CWE-571 ChildOf CWE-885 Category CWE-888  

Demonstrative Examples   (Details)

  1. In the following Java example the updateInventory() method used within an e-business product ordering/inventory application will check if the input product number is in the store or in the warehouse. If the product is found, the method will update the store or warehouse database as well as the aggregate product database. If the product is not found, the method intends to do some special processing without updating any database.

White Box Definitions
None

Black Box Definitions
None

Taxynomy Mappings

TaxynomyIdNameFit
CERT C Secure Coding MSC00-C
 
Compile cleanly at high warning levels
 
 
CERT C++ Secure Coding MSC00-CPP
 
Compile cleanly at high warning levels
 
 

References:
None

© SecPod Technologies