Skip to content

Commit

Permalink
sunos: fix uv_getaddrinfo() NULL pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 29, 2012
1 parent 5639b2f commit deb1c34
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,12 @@ static int uv_getaddrinfo_done(eio_req* req_) {
uv_getaddrinfo_t* req = req_->data;
struct addrinfo *res = req->res;
#if __sun
size_t hostlen = strlen(req->hostname);
size_t hostlen;

if (req->hostname)
hostlen = strlen(req->hostname);
else
hostlen = 0;
#endif

req->res = NULL;
Expand Down

0 comments on commit deb1c34

Please sign in to comment.