translate: fix buffer overflows