fix some validation checks in dns response parsing code