From 0aa82b9e712f62170d7f433b9fb181cdc6a60a92 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 May 2009 20:41:06 -0400 Subject: [PATCH] ifdata: Don't assume that all interface names are 6 characters or less, for instance "wmaster0" is longer. Increase the limit to 20 characters. Closes: #526654 (Thanks, Alan Pope) --- debian/changelog | 8 ++++++++ ifdata.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d9d20e7..aac1f3f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +moreutils (0.35) UNRELEASED; urgency=low + + * ifdata: Don't assume that all interface names are 6 characters or less, + for instance "wmaster0" is longer. Increase the limit to 20 characters. + Closes: #526654 (Thanks, Alan Pope) + + -- Joey Hess Sat, 02 May 2009 20:40:23 -0400 + moreutils (0.34) unstable; urgency=low * vipe: Avoid dying on empty input. Thanks, Anders Kaseorg diff --git a/ifdata.c b/ifdata.c index f8fa024..ba68edc 100644 --- a/ifdata.c +++ b/ifdata.c @@ -246,7 +246,7 @@ struct if_stat *get_stats(const char *iface) { do { int items = fscanf(fd, - " %6[^:]:%llu %llu %llu %llu %llu %llu %llu %llu " + " %20[^:]:%llu %llu %llu %llu %llu %llu %llu %llu " "%llu %llu %llu %llu %llu %llu %llu %llu", name, &ifstat->in_bytes, &ifstat->in_packets, -- 2.39.5