Chapter 5 Integer Security

Everything good is the transmutation of something evil:every god has a devil for a father.—Friedrich Nietzsche. Sämtliche Werke: KritischeStudienausgabe, vol. 10, selection 5[1], number 68

Integers represent a growing and underestimated source of vulnerabilities in C and C++ programs. This is primarily because boundary conditions for integers, unlike other boundary conditions in software engineering, have been intentionally ignored. Most programmers emerging from colleges and universities understand that integers have fixed limits, but because these limits were either deemed sufficient, or because testing the results of each arithmetic operation was considered prohibitively expensive, violating integer boundary conditions ...

Get Secure Coding in C and C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.