]> git.puffer.fish Git - matthieu/frr.git/commit
lib: cli: don't run off graph "pre-end"
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 7 Aug 2017 13:05:34 +0000 (15:05 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 7 Aug 2017 13:05:34 +0000 (15:05 +0200)
commit5225e155d38c58e5dc1f48f9b183142f6745f90c
treeaddb3ea840498f6426c334bd413852721d6618b3
parent9b0a8efa465aac570b076540490f123a1ec80f08
lib: cli: don't run off graph "pre-end"

Behind END_TKN, there is another graph node whose data pointer is
actually struct cmd_element instead of struct cmd_token.  Don't try to
interpret that as cmd_token.  This causes very interesting crashes when
ASLR decides to give one of the strings of a command definition a lower
32-bit value that is a valid cmd_token_type (e.g. FORK_TKN).

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