Function Call With Incorrectly Specified Argument Value |
Weakness ID: 687 (Weakness Variant) | Status: Draft |
Description Summary
Manual Static Analysis This might require an understanding of intended program behavior or design to determine whether the value is incorrect. |
Example 1
This Perl code intends to record whether a user authenticated successfully or not, and to exit if the user fails to authenticate. However, when it calls ReportAuth(), the third argument is specified as 0 instead of 1, so it does not exit.
Ordinality | Description |
---|---|
Primary | (where the weakness exists independent of other weaknesses) |
Nature | Type | ID | Name | View(s) this relationship pertains to![]() |
---|---|---|---|---|
ChildOf | ![]() | 628 | Function Call with Incorrectly Specified Arguments | Development Concepts (primary)699 Research Concepts (primary)1000 |
ChildOf | ![]() | 742 | CERT C Secure Coding Section 08 - Memory Management (MEM) | Weaknesses Addressed by the CERT C Secure Coding Standard (primary)734 |
ParentOf | ![]() | 560 | Use of umask() with chmod-style Argument | Research Concepts (primary)1000 |
When primary, this weakness is most likely to occur in rarely-tested code, since the wrong value can change the semantic meaning of the program's execution and lead to obviously-incorrect behavior. It can also be resultant from issues in which the program assigns the wrong value to a variable, and that variable is later used in a function call. In that sense, this issue could be argued as having chaining relationships with many implementation errors in CWE. |
Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
---|---|---|---|
CERT C Secure Coding | MEM04-C | Do not perform zero length allocations |
Modifications | ||||
---|---|---|---|---|
Modification Date | Modifier | Organization | Source | |
2008-07-01 | Eric Dalci | Cigital | External | |
updated Potential Mitigations | ||||
2008-09-08 | CWE Content Team | MITRE | Internal | |
updated Detection Factors, Relationships, Other Notes, Weakness Ordinalities | ||||
2008-11-24 | CWE Content Team | MITRE | Internal | |
updated Relationships, Taxonomy Mappings | ||||
2009-05-27 | CWE Content Team | MITRE | Internal | |
updated Description | ||||
2009-10-29 | CWE Content Team | MITRE | Internal | |
updated Other Notes, Relationship Notes |