summaryrefslogtreecommitdiffstats
path: root/src/plugins/pppoe/pppoe_cp_node.c
diff options
context:
space:
mode:
authorTimotheeChauvin <timchauv@cisco.com>2020-07-16 12:27:10 +0000
committerBenoƮt Ganne <bganne@cisco.com>2020-07-17 07:09:45 +0000
commit2887159a1a5f5c501c2df59bf88e6faa38e9699f (patch)
tree431ef75c8b8ad77a4d693a49902023a4d5f8d620 /src/plugins/pppoe/pppoe_cp_node.c
parent6c81f5a2493ff65b4dacfef45db8a1ee459a738f (diff)
pppoe: fix uninitialized memory bug
In pppoe_cp_node.c, node->errors[error0] was accessed without node->errors being initialized. Found with AFL + ASAN. Type: fix Signed-off-by: TimotheeChauvin <timchauv@cisco.com> Change-Id: Ide8a60021b2d47b5e2fce7062d8f12c7f4d225f7
Diffstat (limited to 'src/plugins/pppoe/pppoe_cp_node.c')
-rw-r--r--src/plugins/pppoe/pppoe_cp_node.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/pppoe/pppoe_cp_node.c b/src/plugins/pppoe/pppoe_cp_node.c
index 3f866450cfb..bf9018e8c90 100644
--- a/src/plugins/pppoe/pppoe_cp_node.c
+++ b/src/plugins/pppoe/pppoe_cp_node.c
@@ -237,6 +237,9 @@ VLIB_REGISTER_NODE (pppoe_cp_dispatch_node) = {
/* Takes a vector of packets. */
.vector_size = sizeof (u32),
+ .n_errors = PPPOE_N_ERROR,
+ .error_strings = pppoe_error_strings,
+
.n_next_nodes = PPPOE_CP_N_NEXT,
.next_nodes = {
#define _(s,n) [PPPOE_CP_NEXT_##s] = n,