...
Compliant Solution 2
Dereferencing p
has no effect and Correcting this example depends on the programmers intent. For instance, if dereferencing p
was done on accident, then p
should not be dereferenced.
If incrementing the value referred to by p
was the intent, then parentheses can be used to ensure p
is dereferenced then incremented EXP00-A..
Code Block |
---|
|
int *p;
(*p)++
|
Risk Assessment
The presence of code that has no effect could indicate logic errors that may result in unexpected behavior and vulnerabilities.
...