]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: fix missing init in bgp_mp_attr_test.c
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 23 Jan 2013 03:20:37 +0000 (04:20 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 1 Feb 2013 16:55:04 +0000 (17:55 +0100)
turns out, bgp_mp_reach_parse really doesn't like getting garbage
attribute input.  In particular, attr->extra better be NULL or we
merrily go trample random places (like our stack).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/bgp_mp_attr_test.c

index f086740fd3bd122e6947c8bf069e483869f974cb..177c1ad8dc82936e74136128cb56c4b24e04c6dc 100644 (file)
@@ -436,8 +436,8 @@ parse_test (struct peer *peer, struct test_segment *t, int type)
 {
   int ret;
   int oldfailed = failed;
-  struct attr attr;
-  struct bgp_nlri nlri;
+  struct attr attr = { };
+  struct bgp_nlri nlri = { };
   struct bgp_attr_parser_args attr_args = {
     .peer = peer,
     .length = t->len,