Skip to content
← All glossary terms

How It Works

Off-by-one error

A programming mistake in which a count, index, or boundary is one too high or one too low. For example, a loop intended to process ten items might process nine or eleven because its stopping condition is wrong. Consequences range from skipped data to crashes or memory-access vulnerabilities.

Origin · no single documented coiner

Established programming terminology; no single coiner is credited here. MITRE's Common Weakness Enumeration documents the security-relevant form as CWE-193, an incorrect maximum or minimum that differs from the correct value by one.

Read the source →