Fix overruns; avoid sprintf.