diff options
author | Jiri Popelka <jpopelka@redhat.com> | 2011-12-07 19:10:11 +0100 |
---|---|---|
committer | Jiri Popelka <jpopelka@redhat.com> | 2012-01-05 12:22:43 +0100 |
commit | 796ba7f1e59883a85558996ea7785054ae45aac0 (patch) | |
tree | e068a45f418f90d20308a915424b6d8fdf04f913 | |
parent | 7b576887254696cb60c42c11e7bae4bb0babaf23 (diff) | |
download | net-tools-796ba7f1e59883a85558996ea7785054ae45aac0.tar.gz net-tools-796ba7f1e59883a85558996ea7785054ae45aac0.tar.bz2 net-tools-796ba7f1e59883a85558996ea7785054ae45aac0.zip |
prevent 'netstat -nr -A inet6' from smashing stack (RHBZ #668047)
-rw-r--r-- | lib/inet6_gr.c | 2 | ||||
-rw-r--r-- | lib/inet_gr.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/inet6_gr.c b/lib/inet6_gr.c index 2b055f6..a136231 100644 --- a/lib/inet6_gr.c +++ b/lib/inet6_gr.c @@ -82,7 +82,7 @@ int rprint_fib6(int ext, int numeric) "Flag Met Ref Use If\n")); while (fgets(buff, 1023, fp)) { - num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %08x %08x %08x %08x %s\n", + num = sscanf(buff, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %02x %4s%4s%4s%4s%4s%4s%4s%4s %08x %08x %08x %08x %15s\n", addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7], &prefix_len, diff --git a/lib/inet_gr.c b/lib/inet_gr.c index 84d8406..332bf92 100644 --- a/lib/inet_gr.c +++ b/lib/inet_gr.c @@ -68,7 +68,7 @@ int rprint_fib(int ext, int numeric) mss = 0; fmt = proc_gen_fmt(_PATH_PROCNET_ROUTE, 0, fp, - "Iface", "%16s", + "Iface", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", @@ -80,7 +80,7 @@ int rprint_fib(int ext, int numeric) "Window", "%d", "IRTT", "%d", NULL); - /* "%16s %127s %127s %X %d %d %d %127s %d %d %d\n" */ + /* "%15s %127s %127s %X %d %d %d %127s %d %d %d\n" */ if (!fmt) return 1; @@ -268,7 +268,7 @@ int rprint_cache(int ext, int numeric) "MSS Window irtt HH Arp\n")); fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp, - "Iface", "%16s", + "Iface", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", @@ -282,7 +282,7 @@ int rprint_cache(int ext, int numeric) "HH", "%d", "ARP", "%d", NULL); - /* "%16s %127s %127s %X %d %d %d %127s %d %d %d %d %d\n" */ + /* "%15s %127s %127s %X %d %d %d %127s %d %d %d %d %d\n" */ } if (format == 2) { @@ -291,7 +291,7 @@ int rprint_cache(int ext, int numeric) "Flags Metric Ref Use Iface " "MSS Window irtt TOS HHRef HHUptod SpecDst\n")); fmt = proc_gen_fmt(_PATH_PROCNET_RTCACHE, 0, fp, - "Iface", "%16s", + "Iface", "%15s", "Destination", "%127s", "Gateway", "%127s", "Flags", "%X", @@ -307,7 +307,7 @@ int rprint_cache(int ext, int numeric) "HHUptod", "%d", "SpecDst", "%127s", NULL); - /* "%16s %127s %127s %X %d %d %d %127s %d %d %d %d %d %127s\n" */ + /* "%15s %127s %127s %X %d %d %d %127s %d %d %d %d %d %127s\n" */ } |