Skip to content

dns: fix empty elem in result array

Rodrigo Muino Tomonari requested to merge github/fork/john-yan/dns-fix into master

When getaddrinfo linked-list results contain entries other than AF_INET and AF_INET6, the resulting v8::Array will contain undefined value. That's because initialization of v8::Array pre-allocate entries for all linked-list nodes, but we may actually some of them after the 2 while loops.

Merge request reports

Loading