1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00

Put the sscanf count check right after the call to sscanf.

This commit is contained in:
david
2012-09-27 03:10:28 +00:00
parent 06dcb1c138
commit bfea61a51e

View File

@@ -255,6 +255,10 @@ route_loop(route_t *r, route_handler callback, void *arg)
&dlen, s, &slen,
n[0], n[1], n[2], n[3], n[4], n[5], n[6], n[7],
&iflags, ifbuf);
if (i < 21 || !(iflags & RTF_UP))
continue;
snprintf(buf, sizeof(buf), "%s:%s:%s:%s:%s:%s:%s:%s/%d",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
dlen);
@@ -264,9 +268,6 @@ route_loop(route_t *r, route_handler callback, void *arg)
IP6_ADDR_BITS);
addr_aton(buf, &entry.route_gw);
if (i < 21 || !(iflags & RTF_UP))
continue;
if ((ret = callback(&entry, arg)) != 0)
break;
}