thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Application & OT Security · Advanced

Integer Overflow

An arithmetic result that exceeds the maximum value of its integer type and wraps around, often leading to undersized buffers.

Definition

Wraparound can cause a length check to pass or an allocation to be too small, followed by a buffer overflow. Mitigations include checked arithmetic, using sufficiently wide types, validating sizes before allocation and compiler options that trap on overflow. Tracked as CWE-190.

Example

count * size wraps to a small number, so malloc allocates 16 bytes for a large copy.

Exam tip

Integer overflow is often the root cause behind a heap overflow.

Don't confuse it with

Related terms