fix off-by-one in checking hostname length in new resolver backend