|
This figure is the code implemented according to the requirements of Case 3. Case 3 satisfies both reliability and security. According to Case 3 requirements, the first and last within the defined input range have numbers from 1 to 100. And since deliberate or accidental intrusion is impossible, they cannot have a value other than 1 to 100. Therefore, integer overflow will not occur. If an alarm occurs by executing a static analysis tool for the code in Figure 2, this alarm is unconditionally false positive. |