Description -
A programmer should keep a check on the following (sub-sections):
- ânâ > size of âpâ // for func(p,n)
- ânâ and âpâ are not compatible
- ânâ > size of âpâ or size of âqâ || âpâ and âqâ are not compatible // for func(p,q, n)
- âpâ and âqâ are compatible but not with ânâ
- Correct usage of expression E // for E: T* = mem_alloc(n)
Non-Compliant Code Example
// NCCE example
*Remember to follow the desired coding style
Compliant Solution
// CS example
*Remember to follow the desired coding style
Risk Assessment
Depending on the library function called, the attacker may be able to use a heap overflow vulnerability to run arbitrary code. The detection of checks specified in description can be automated but the remediation has to be manual.
Rule |
Severity |
Likelihood |
Remediation Cost |
Priority |
Level |
---|---|---|---|---|---|
ARR38-C |
high |
likely |
medium |
P18 |
L1 |