Null-terminate query reply string