Integrate integer overflow changes from security branch

Replace the limits from stdint.h by the limit from
std::numeric_limits<>.
4 files changed