xml: fix null-termination