Commit b176d30a authored by cjihrig's avatar cjihrig
Browse files

dns: handle array holes in setServers()

This commit adds better handling of exceptional array formats
passed to dns.setServers(). Prior to this commit, the input
array was validated using map(), which preserves holes, allowing
them to be passed to c-ares, crashing Node. This commit replaces
map() with forEach(), which skips holes.

Fixes: https://github.com/nodejs/node/issues/8538
PR-URL: https://github.com/nodejs/node/pull/8567


Reviewed-By: default avatarIlkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent d4bf5cac
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment