From c371d357148819f69be13a3a9e4569d10933d82f Mon Sep 17 00:00:00 2001 From: david Date: Mon, 24 Aug 2009 21:14:51 +0000 Subject: [PATCH] Add a check against svc->probe_matched being NULL before doing a string comparison in scanThroughTunnel. It is checked against NULL later in the function, so presumably it can happen. --- service_scan.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_scan.cc b/service_scan.cc index 8cab4aafe..292f8497f 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -1829,7 +1829,7 @@ static void startNextProbe(nsock_pool nsp, nsock_iod nsi, ServiceGroup *SG, static int scanThroughTunnel(nsock_pool nsp, nsock_iod nsi, ServiceGroup *SG, ServiceNFO *svc) { - if (strncmp(svc->probe_matched, "ssl/", 4) == 0) { + if (svc->probe_matched && strncmp(svc->probe_matched, "ssl/", 4) == 0) { /* The service has been detected without having to make an SSL connection */ svc->tunnel = SERVICE_TUNNEL_SSL; svc->probe_matched += 4;