EFFECT
When another operation is used instead of = in assignment expression, the statement has no effect.
Vulnerability and risk
Potentially a critical problem.
Example 1
Copy
class A{
int foo(int);
};
int A::foo(int k){
int j = 1;
k = 0;
if(j){
j > k; // EFFECT
return j;
}else{
k++;
return k;
}
}
External guidance
Security training
Application security training materials provided by Secure Code Warrior.