diff --git a/service_scan.cc b/service_scan.cc index a3fd6831f..50b5cc76f 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -1449,7 +1449,8 @@ void ServiceNFO::addToServiceFingerprint(const char *probeName, const u8 *resp, if (servicefplen == 0) { timep = time(NULL); ltime = localtime(&timep); - servicefplen = Snprintf(servicefp, spaceleft, "SF-Port%hu-%s:V=%s%s%%I=%d%%D=%d/%d%%Time=%X%%P=%s", portno, proto2ascii_uppercase(proto), NMAP_VERSION, (tunnel == SERVICE_TUNNEL_SSL)? "%T=SSL" : "", o.version_intensity, ltime->tm_mon + 1, ltime->tm_mday, (int) timep, NMAP_PLATFORM); + len = Snprintf(buf, sizeof(buf), "SF-Port%hu-%s:V=%s%s%%I=%d%%D=%d/%d%%Time=%X%%P=%s", portno, proto2ascii_uppercase(proto), NMAP_VERSION, (tunnel == SERVICE_TUNNEL_SSL)? "%T=SSL" : "", o.version_intensity, ltime->tm_mon + 1, ltime->tm_mday, (int) timep, NMAP_PLATFORM); + addServiceString(buf, servicewrap); } // Note that we give the total length of the response, even though we