mirror of
https://github.com/nmap/nmap.git
synced 2025-12-30 19:39:07 +00:00
Use string_pool for service names so they aren't freed by Lua. See #2657
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
#include "services.h"
|
||||
#include "protocols.h"
|
||||
#include "tcpip.h"
|
||||
#include "string_pool.h"
|
||||
#include "libnetutil/netutil.h"
|
||||
|
||||
#if HAVE_STRINGS_H
|
||||
@@ -347,7 +348,7 @@ void PortList::setServiceProbeResults(u16 portno, int protocol,
|
||||
port->service->service_tunnel = tunnel;
|
||||
|
||||
if (sname)
|
||||
port->service->name = sname;
|
||||
port->service->name = string_pool_insert(sname);
|
||||
else
|
||||
port->service->name = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user