VariantDraft

CWE-685Function Call With Incorrect Number of Arguments

Category: other

Description

The product calls a function, procedure, or routine, but the caller specifies too many arguments, or too few arguments, which may lead to undefined behavior and resultant weaknesses.

Common consequences· 1

  • Other — Quality Degradation

Potential mitigations· 1

  • [Testing]Because this function call often produces incorrect behavior it will usually be detected during testing or normal operation of the product. 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.

References

  1. https://cwe.mitre.org/data/definitions/685.html

Related by meaning· 6

Nearest entities by semantic similarity across the cs-graph corpus.

CWE
Function Call With Incorrect Variable or Reference as Argument
CWE
Function Call with Incorrectly Specified Arguments
CWE
Function Call With Incorrectly Specified Argument Value
CWE
Function Call With Incorrect Argument Type
CWE
Function Call With Incorrect Order of Arguments
CWE
Invokable Control Element with Signature Containing an Excessive Number of Parameters
Sourced from MITRE CWE 4.20. Curated for EU compliance use cases by Adam Lundqvist, Founder at SQUR.