[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1412870721-31061-1-git-send-email-osandov@osandov.com>
Date: Thu, 9 Oct 2014 09:05:21 -0700
From: Omar Sandoval <osandov@...ndov.com>
To: Jamal Hadi Salim <jhs@...atatu.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Omar Sandoval <osandov@...ndov.com>
Subject: [PATCH] net sched: text ematch: zero out ts_state before using it
textsearch_find zeroes out the offset, but the control buffer (which may or may
not matter in this case) needs to be zeroed out as well.
Signed-off-by: Omar Sandoval <osandov@...ndov.com>
---
net/sched/em_text.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/em_text.c b/net/sched/em_text.c
index 15d353d..2a1b6d9 100644
--- a/net/sched/em_text.c
+++ b/net/sched/em_text.c
@@ -36,6 +36,8 @@ static int em_text_match(struct sk_buff *skb, struct tcf_ematch *m,
int from, to;
struct ts_state state;
+ memset(&state, 0, sizeof(state));
+
from = tcf_get_base_ptr(skb, tm->from_layer) - skb->data;
from += tm->from_offset;
--
2.1.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists