diff --git a/nmap_ftp.cc b/nmap_ftp.cc index 6cd8435ba..0f73b9481 100644 --- a/nmap_ftp.cc +++ b/nmap_ftp.cc @@ -339,7 +339,7 @@ void bounce_scan(Target *target, u16 *portarray, int numports, } else { error("Your FTP bounce server doesn't allow privileged ports, skipping them."); while (i < numports && portarray[i] < 1024) i++; - if (!portarray[i]) { + if (i >= numports) { fatal("And you didn't want to scan any unprivileged ports. Giving up."); } }