From: Stephen Hemminger Date: Thu, 19 Feb 2009 16:59:06 +0000 (-0800) Subject: fix uninitialized memory in tc_skbedit X-Git-Tag: v2.6.29~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46a6573259f46f86eb0048a2c805b24ff4183fa6;p=thirdparty%2Fiproute2.git fix uninitialized memory in tc_skbedit Original from: Alexander Duyck A bug was found in which the memory for the tc_skbedit struct was being used uninitialized to 0. Alternative version of original fix using initializer rather than memset. Signed-off-by: Alexander Duyck Signed-off-by: Jeff Kirsher --- diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c index 55e3f89e4..9044353d3 100644 --- a/tc/m_skbedit.c +++ b/tc/m_skbedit.c @@ -48,7 +48,6 @@ static int parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n) { - struct tc_skbedit sel; int argc = *argc_p; char **argv = *argv_p; int ok = 0; @@ -56,6 +55,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, unsigned int tmp; __u16 queue_mapping; __u32 flags = 0, priority; + struct tc_skbedit sel = { 0 }; if (matches(*argv, "skbedit") != 0) return -1;