fix uninitialized memory in tc_skbedit

Original from: Alexander Duyck <alexander.h.duyck@intel.com>

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 <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
Stephen Hemminger 2009-02-19 08:59:06 -08:00
parent c86f34942a
commit 46a6573259
1 changed files with 1 additions and 1 deletions

View File

@ -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;