mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 20:51:30 +00:00
Bounce scan: avoid array overrun (read) by checking index instead
This commit is contained in:
@@ -339,7 +339,7 @@ void bounce_scan(Target *target, u16 *portarray, int numports,
|
|||||||
} else {
|
} else {
|
||||||
error("Your FTP bounce server doesn't allow privileged ports, skipping them.");
|
error("Your FTP bounce server doesn't allow privileged ports, skipping them.");
|
||||||
while (i < numports && portarray[i] < 1024) i++;
|
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.");
|
fatal("And you didn't want to scan any unprivileged ports. Giving up.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user