Fix up potential buffer overflows that clang reports.