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.
This commit is contained in:
david 2009-08-24 21:14:51 +00:00
parent ddf05afe1b
commit c371d35714

View file

@ -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;