CWE-704 不正确的类型转换

Incorrect Type Conversion or Cast

结构: Simple

Abstraction: Class

状态: Incomplete

被利用可能性: unkown


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


  • cwe_Nature: ChildOf cwe_CWE_ID: 664 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 664 cwe_View_ID: 699 cwe_Ordinal: Primary


Language: [{'cwe_Name': 'C', 'cwe_Prevalence': 'Often'}, {'cwe_Name': 'C++', 'cwe_Prevalence': 'Often'}, {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}]


范围 影响 注释
Other Other


映射的分类名 ImNode ID Fit Mapped Node Name
CERT C Secure Coding EXP05-C Do not cast away a const qualification
CERT C Secure Coding EXP39-C CWE More Abstract Do not access a variable through a pointer of an incompatible type
CERT C Secure Coding INT31-C CWE More Abstract Ensure that integer conversions do not result in lost or misinterpreted data
CERT C Secure Coding INT36-C CWE More Abstract Converting a pointer to integer or integer to pointer
CERT C Secure Coding STR34-C CWE More Abstract Cast characters to unsigned types before converting to larger integer sizes
CERT C Secure Coding STR37-C CWE More Abstract Arguments to character handling functions must be representable as an unsigned char
Software Fault Patterns SFP1 Glitch in computation