aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/pppoe/pppoe_decap.c
diff options
context:
space:
mode:
authorTimotheeChauvin <timchauv@cisco.com>2020-07-16 12:27:10 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 19:47:21 +0000
commit76797dc615b641362692337fbbaedd0f0cabb00e (patch)
treee6bb047df2594be49576da58bd0945c117f45447 /src/plugins/pppoe/pppoe_decap.c
parent526906751067ff66a87bab591766bc0ff4b91095 (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 (cherry picked from commit 2887159a1a5f5c501c2df59bf88e6faa38e9699f)
Diffstat (limited to 'src/plugins/pppoe/pppoe_decap.c')
-rw-r--r--src/plugins/pppoe/pppoe_decap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/pppoe/pppoe_decap.c b/src/plugins/pppoe/pppoe_decap.c
index 256dd83e43d..d3f4a5fedf3 100644
--- a/src/plugins/pppoe/pppoe_decap.c
+++ b/src/plugins/pppoe/pppoe_decap.c
@@ -390,12 +390,14 @@ VLIB_NODE_FN (pppoe_input_node) (vlib_main_t * vm,
return from_frame->n_vectors;
}
-static char * pppoe_error_strings[] = {
+#ifndef CLIB_MARCH_VARIANT
+char * pppoe_error_strings[] = {
#define pppoe_error(n,s) s,
#include <pppoe/pppoe_error.def>
#undef pppoe_error
#undef _
};
+#endif /* CLIB_MARCH_VARIANT */
VLIB_REGISTER_NODE (pppoe_input_node) = {
.name = "pppoe-input",