metrics: fix potential missing string termination