NShiftKey-Rule-Guide logo NShiftKey-Rule-Guide

1. Vulnerability Description

2. Vulnerability Countermeasure

3. Sample Code

/* In another source file */
long f(long x) {
  return x < 0 ? -x : x;
}
 
/* In this source file, no f prototype in scope */
long f();
  
long g(int x) {
  return f(x);
}
/* In another source file */
long f(long x) {
  return x < 0 ? -x : x;
}
 
/* f prototype in scope in this source file */
long f(long x);
 
long g(int x) {
  return f((long)x); 
}