Vulnerabilities induced by migrating to 64-bit platforms
blog.acolyer.org
blog.acolyer.org
So, proper care of buffer overflow doesn't end when test everywhere if you're really within bounds, but when conversions from different sizes of data types, given that 64 and 32-bits number types can use more or less bytes in memory.
And in one of the examples:
> For example, assigning a pointer to an int variable under ILP32 is never truncating (4 -> 4), but on the 64-bit platforms it is (8 -> 4).
AFAIK, stdint.h is from 1999, and at least one very popular operating system didn't have it until this decade; of the codebases mentioned, according to Wikipedia for instance both PHP and zlib are from 1995.
Nowadays, I agree: you should use stdint.h (or cstdint for C++) for everything, plus size_t (from stddef.h/cstddef) for array/buffer sizes.