lockd: fix access beyond unterminated strings in prints