DORMANTno replies

[iproute PATCH] tc: Fix for missing estimator initialization

From: Phil Sutter <phil@nwl.cc>
Date: 2016-08-03 09:53:32
Subsystem: the rest · Maintainer: Linus Torvalds

When switching to C99 initializers, I forgot to add this one. This means
that when trying to set an estimator value, tc would complain about
spurious duplicate estimator parameter. But much worse, the random
variable content is sent to the kernel regardless of whether an
estimator was given or not.

Fixes: d17b136f7d7dd ("Use C99 style initializers everywhere")
Reported-by: Stas Nichiporovich <redacted>
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 tc/tc_qdisc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index bc87aab110e48..93c9a4c1daa28 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -45,7 +45,7 @@ static int usage(void)
 static int tc_qdisc_modify(int cmd, unsigned int flags, int argc, char **argv)
 {
 	struct qdisc_util *q = NULL;
-	struct tc_estimator est;
+	struct tc_estimator est = {};
 	struct {
 		struct tc_sizespec	szopts;
 		__u16			*data;
-- 
2.8.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help