|
This figure is the code implemented according to the requirements of Case 4. Case 4 does not satisfy reliability but security. According to Case 4 requirements, first and last within the defined input range have numbers between 1 and INT_MAX. Also, since deliberate or accidental intrusion is impossible, they cannot have values other than 1 to INT_MAX. When first and last have a value greater than INT_MAX/2, an integer overflow will occur. Suppose an alarm occurs by executing a static analysis tool for this code. In that case, reliability-oriented groups will judge the alarm as true positive, and security-oriented groups will determine the alarm as false positive. |