This change fixes a NULL deref when accept() is handed a legal NULL
argument for addr, in which case it should not attempt to output.
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1593
acc->remote = data->listen.q[i].remote;
acc->flags |= UNIXSOCK_CONN;
- unix_sock_remotename(acc->remote, addr, addr_len);
+ if (addr)
+ unix_sock_remotename(acc->remote, addr, addr_len);
return acc;
}