1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Bounce scan: avoid array overrun (read) by checking index instead

This commit is contained in:
dmiller
2016-07-29 15:50:48 +00:00
parent b6dfce6217
commit 09eef559c3

View File

@@ -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.");
}
}