diff --git a/CHANGELOG b/CHANGELOG index f239b5153..ba4e5dd59 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -34,7 +34,8 @@ o Made RPC grinding work from service detection again by changing the 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] + gcc -Wformat -Werror=format-security options. [Guillaume Rousse, + Dmitry Levin] o [Ndiff] Ndiff now shows changes in script output. [David] diff --git a/scan_engine.cc b/scan_engine.cc index f4c5c4ef7..1f8bd5118 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -3603,7 +3603,6 @@ static bool do_one_select_round(UltraScanInfo *USI, struct timeval *stime) { int newhoststate = HOST_UNKNOWN; int optval; recvfrom6_t optlen = sizeof(int); - char buf[128]; int numGoodSD = 0; int err = 0; u16 pport = 0; @@ -3781,12 +3780,10 @@ static bool do_one_select_round(UltraScanInfo *USI, struct timeval *stime) { case ENETDOWN: 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("%s", buf); + fatal("Strange SO_ERROR from connection to %s (%d - '%s') -- bailing scan", host->target->targetipstr(), optval, strerror(optval)); break; default: - Snprintf(buf, sizeof(buf), "Strange read error from %s (%d - '%s')", host->target->targetipstr(), optval, strerror(optval)); - perror(buf); + error("Strange read error from %s (%d - '%s')", host->target->targetipstr(), optval, strerror(optval)); break; }