The software calls a function, procedure, or routine, but the caller specifies an argument that is the wrong data type, which may lead to resultant weaknesses. This weakness is most likely to occur in loosely typed languages, or in strongly typed languages in which the types of variable arguments cannot be enforced at compilation time, or where there is implicit casting. 1000 699 Weakness ChildOf 628 734 Category ChildOf 736 734 Category ChildOf 739 734 Category ChildOf 741 734 Category ChildOf 743 734 Category ChildOf 748 868 Category ChildOf 873 868 Category ChildOf 875 888 Category ChildOf 885 Primary Implementation Other Quality degradation Testing Because this function call often produces incorrect behavior it will usually be detected during testing or normal operation of the software. During testing exercise all possible control paths will typically expose this weakness except in rare cases when the incorrect function call accidentally produces the correct results or if the provided argument type is very similar to the expected argument type. Do not invoke a function using a type that does not match the function definition DCL35-C Take care when creating format strings FIO00-C Do not call functions expecting real values with complex values FLP31-C Do not call putenv() with a pointer to an automatic variable as the argument POS34-C Arguments to character handling functions must be representable as an unsigned char STR37-C Do not call functions expecting real values with complex values FLP31-CPP Arguments to character handling functions must be representable as an unsigned char STR37-CPP Eric Dalci Cigital 2008-07-01 updated Potential_Mitigations CWE Content Team MITRE 2008-09-08 updated Description, Relationships, Other_Notes, Weakness_Ordinalities CWE Content Team MITRE 2008-11-24 updated Relationships, Taxonomy_Mappings CWE Content Team MITRE 2009-05-27 updated Description CWE Content Team MITRE 2009-10-29 updated Other_Notes, Potential_Mitigations CWE Content Team MITRE 2011-06-01 updated Common_Consequences CWE Content Team MITRE 2011-06-27 updated Common_Consequences CWE Content Team MITRE 2011-09-13 updated Relationships, Taxonomy_Mappings CWE Content Team MITRE 2012-05-11 updated Relationships CWE Content Team MITRE 2012-10-30 updated Potential_Mitigations