Spamlaws Glossary

Integer Overflow

Integer Overflow
An integer overflow takes place when an operation attempts to create numerical values that exceed the limit of what can be represented in the allotted storage space. For example, simply adding a 1 to the highest value will prompt an integer overflow. In reference to the C programming language, a signed integer overflow will prompt unusual behavior, while an unsigned integer overflow reduces the value, causing a wrap around effect. Sometimes a program assumes that variables always consist of accurate values. However, if that variable has a signed integer overflow, the value may wrap and make way for a negative reaction. This violates the program’s assumption and usually leads to odd behavior. Subtracting small unsigned values may also cause an overflow and prompt unintended behavior. If this value is ever used as the number of bytes to represent a buffer, the buffer will not receive enough allocation, a factor that could potentially cause a buffer overflow.
Integer Overflow