Browse Source

tests: fix missing init in bgp_mp_attr_test.c

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>
David Lamparter 7 years ago
parent
commit
aeef13b0d5
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/bgp_mp_attr_test.c

+ 2 - 2
tests/bgp_mp_attr_test.c

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