mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Add a guard against getaddrinfo returning an empty list of addresses in
l_nsock_connect. It hasn't been reported to cause problems but will cause a crash if it ever happens.
This commit is contained in:
parent
a9799715e5
commit
76dd72ba94
1 changed files with 5 additions and 0 deletions
|
|
@ -451,6 +451,11 @@ static int l_nsock_connect(lua_State *L) {
|
|||
lua_pushstring(L, error);
|
||||
return 2;
|
||||
}
|
||||
if (dest == NULL) {
|
||||
lua_pushboolean(L, false);
|
||||
lua_pushstring(L, "getaddrinfo returned success but no addresses");
|
||||
return 2;
|
||||
}
|
||||
|
||||
udata->nsiod = nsi_new(nsp, NULL);
|
||||
if (o.spoofsource) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue