dns: fix non-NULL terminated C-string