mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Prevent a null pointer dereference in nse_nsock_get_ssl.
This could be provoked by a script calling nmap.get_ssl_certificate on an unconnected socket.
This commit is contained in:
parent
fc49819007
commit
091d848838
1 changed files with 1 additions and 1 deletions
|
|
@ -709,7 +709,7 @@ SSL *nse_nsock_get_ssl (lua_State *L)
|
|||
{
|
||||
nse_nsock_udata *nu = check_nsock_udata(L, 1, 0);
|
||||
|
||||
if (!nsi_checkssl(nu->nsiod))
|
||||
if (nu->nsiod == NULL || !nsi_checkssl(nu->nsiod))
|
||||
luaL_argerror(L, 1, "not a SSL socket");
|
||||
|
||||
return (SSL *) nsi_getssl(nu->nsiod);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue