1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

Applied patch:

o Fixed a log_write call and a pfatal call to use a syntax which is
  safer from format strings bugs.  This allows Nmap to build with the
  gcc -Wformat -Werror=format-security options. [Guillaume Rousse]
This commit is contained in:
fyodor
2009-07-19 07:23:32 +00:00
parent e4c5e1e6d4
commit 1736dde56c
3 changed files with 6 additions and 2 deletions

View File

@@ -11,6 +11,10 @@ o Made RPC grinding work from service detection again by changing the
looked-for service name from "rpc" to "rpcbind", the name it has in
nmap-service-probes. [David]
o Fixed a log_write call and a pfatal call to use a syntax which is
safer from format strings bugs. This allows Nmap to build with the
gcc -Wformat -Werror=format-security options. [Guillaume Rousse]
o [Ndiff] Ndiff now shows changes in script output. [David]
o A bug in Nsock was fixed: On systems where a nonblocking connect

View File

@@ -566,7 +566,7 @@ void printportoutput(Target *currenths, PortList *plist) {
currenths->NameIP(hostname, sizeof(hostname)),
(numignoredports == 1)? "is" : "are");
if (plist->numIgnoredStates() == 1) {
log_write(LOG_PLAIN, statenum2str(plist->nextIgnoredState(PORT_UNKNOWN)));
log_write(LOG_PLAIN, "%s", statenum2str(plist->nextIgnoredState(PORT_UNKNOWN)));
} else {
prevstate = PORT_UNKNOWN;
while ((istate = plist->nextIgnoredState(prevstate)) != PORT_UNKNOWN) {

View File

@@ -3783,7 +3783,7 @@ static bool do_one_select_round(UltraScanInfo *USI, struct timeval *stime) {
case ENETRESET:
case ECONNABORTED:
Snprintf(buf, sizeof(buf), "Strange SO_ERROR from connection to %s (%d - '%s') -- bailing scan", host->target->targetipstr(), optval, strerror(optval) );
pfatal(buf);
pfatal("%s", buf);
break;
default:
Snprintf(buf, sizeof(buf), "Strange read error from %s (%d - '%s')", host->target->targetipstr(), optval, strerror(optval));