|
We discuss a potential integer overflow in terms of reliability and security. To discuss this, we use a binary search as an example. To proceed with the experiment and analysis, we made four cases as follows. Case 1 is finding the natural number N in an array sorted from 1 to 100. Also, Case 2 finds the natural number N in an array sorted from 1 to INT_MAX-1. Case 3 finds the natural number N in an array sorted from 1 to 100 and protects itself against deliberate or accidental intrusion. And Case 4 finds the natural number N in an array sorted from 1 to INT_MAX and protects itself against deliberate or accidental intrusion. |