Sanitized buffer handling when formatting integers. Should also protect against buffer overrun if INT_TYPE ever becomes larger, provided anyone runs the testsuite with rtldebug.