[Forgot Password]
Login  Register Subscribe

23631

 
 

115084

 
 

97559

 
 

909

 
 

78730

 
 

109

Paid content will be excluded from the download.


Download | Alert*
CWE
view XML

Incorrect Type Conversion or Cast

ID: 704Date: (C)2012-05-14   (M)2017-11-15
Type: weaknessStatus: INCOMPLETE
Abstraction Type: Class





Description

The software does not correctly convert an object, resource or structure from one type to a different type.

Applicable Platforms
Language: Often
Language: C
Language: Often
Language: C++
Language Class: All

Time Of Introduction

  • Architecture and Design
  • Implementation

Common Consequences

ScopeTechnical ImpactNotes
Other
 
Other
 
 

Detection Methods
None

Potential Mitigations
None

Relationships

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

Demonstrative Examples
None

White Box Definitions
None

Black Box Definitions
None

Taxynomy Mappings

TaxynomyIdNameFit
CERT C Secure Coding EXP05-C
 
Do not cast away a const qualification
 
 
CERT C Secure Coding MSC31-C
 
Ensure that return values are compared against the proper type
 
 
CERT C Secure Coding STR34-C
 
Cast characters to unsigned types before converting to larger integer sizes
 
 
CERT C Secure Coding STR37-C
 
Arguments to character handling functions must be representable as an unsigned char
 
 
CERT C++ Secure Coding STR34-CPP
 
Cast characters to unsigned types before converting to larger integer sizes
 
 
CERT C++ Secure Coding STR37-CPP
 
Arguments to character handling functions must be representable as an unsigned char
 
 
CERT C++ Secure Coding MSC31-CPP
 
Ensure that return values are compared against the proper type
 
 

References:
None

© 2013 SecPod Technologies