summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2015-05-17 15:12:55 +0000
committerloos <loos@FreeBSD.org>2015-05-17 15:12:55 +0000
commita416f5f99655bc262224191178e0c9da76c5632b (patch)
tree6eef07c8021237badbada0945dea58507be98d0d
parent452e5a702dd4171ee2527f9a52025bdc5cf32420 (diff)
downloadFreeBSD-src-a416f5f99655bc262224191178e0c9da76c5632b.zip
FreeBSD-src-a416f5f99655bc262224191178e0c9da76c5632b.tar.gz
Adjust the string format to match the actual number of arguments.
This fix a segmentation fault on ARM when netstat -r is used together with -W. This issue was introduced in r279122.
-rw-r--r--usr.bin/netstat/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index 676f616..675d379 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -236,7 +236,7 @@ pr_rthdr(int af1)
xo_emit("{T:/%-8.8s} ","Address");
if (Wflag) {
xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} "
- "{T:/%*.*s} {T:/%*.*s} {T:/%*.*s} {T:/%*s}\n",
+ "{T:/%*.*s} {T:/%*.*s} {T:/%*s}\n",
wid_dst, wid_dst, "Destination",
wid_gw, wid_gw, "Gateway",
wid_flags, wid_flags, "Flags",
OpenPOWER on IntegriCloud