| ||
Do check all calculations used to determine memory allocations to check thatthe arithmetic cannot overflow.
Do check all calculations used to determine array indexes to check that the arithmetic cannot overflow.
Do use unsigned integers for array offsets and memory allocation sizes.
Do not think languages other than C/C++ are immune to integer overflows.