From fe63809293a5041e101ad056197b3190e0df1f23 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 16 Nov 2007 00:48:44 +0000 Subject: [PATCH] Setting uninitialized pointer to NULL. It was possible that it would not be set, and also not be NULL so it would bypass the assert() on it, which in turn caused a crash. Found with Coverity, CID 18 --- service_scan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_scan.cc b/service_scan.cc index a3e1c1b32..4445dc3a5 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -1057,7 +1057,7 @@ void ServiceProbe::addMatch(const char *match, int lineno) { NOT be made static because I have external maintenance tools (servicematch) which use this */ void parse_nmap_service_probe_file(AllProbes *AP, char *filename) { - ServiceProbe *newProbe; + ServiceProbe *newProbe = NULL; char line[2048]; int lineno = 0; FILE *fp;