From 2cea96ea2b5711ae212838735f0cc43a41bf4263 Mon Sep 17 00:00:00 2001 From: batrick Date: Tue, 3 Jun 2008 02:17:10 +0000 Subject: [PATCH] Minor change to Kris' change to make nmap.registry.args always available. Avoided using strdup() although it's minor. --- NmapOps.cc | 2 +- NmapOps.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NmapOps.cc b/NmapOps.cc index fc4cb1bdd..a3f1dab4f 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -459,7 +459,7 @@ void NmapOps::ValidateOptions() { /* Make sure nmap.registry.args is available (even if it's empty) */ if (!scriptargs) - scriptargs = strdup(""); + scriptargs = ""; } void NmapOps::setMaxOSTries(int mot) { diff --git a/NmapOps.h b/NmapOps.h index 9bc5ea05e..c85ccc26b 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -319,7 +319,7 @@ class NmapOps { #ifndef NOLUA int script; - char *scriptargs; + const char *scriptargs; int scriptversion; int scripttrace; int scriptupdatedb;