-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
Description
The DNS module's lookupService
method throws an unwrapped C error when given a string for a port number. This isn't ideal; preferably a TypeError would be thrown instead, or the function would just parse the string to an integer.
The following error messages is given for the failing test cases shown below.
node: ../src/cares_wrap.cc:1098: void node::cares_wrap::GetNameInfo(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `args[2]->IsUint32()' failed.
Aborted
If I'm missing any important information, please tell me and I'll update this issue.
Environment:
- Node v5.4.1
- Npm 3.5.3
- Linux 4.2.0-23-generic (Ubuntu)
Test-Case:
Failing Test Cases:
require('dns').lookupService('0.0.0.0', '0', (err, hostname, service) => {
})
require('dns').lookupService('127.0.0.1', '443', (err, hostname, service) => {
})
Control Test Cases:
Both these cases behave normally; they don't throw a C error.
require('dns').lookupService('0.0.0.0', 0, (err, hostname, service) => {
})
require('dns').lookupService('127.0.0.1', 443, (err, hostname, service) => {
})
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.