You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
852 B

  1. From f94ffac18ddfe72b00ec849a34c71d6bc5bcb767 Mon Sep 17 00:00:00 2001
  2. From: Yousong Zhou <yszhou4tech@gmail.com>
  3. Date: Thu, 12 Nov 2020 14:31:23 +0800
  4. Subject: [PATCH] xl2tpd-control: fix out-of-bound access
  5. It can cause segfault when presented with unknown command name
  6. Fixes 90884c62 ("xl2tpd-control refactoring")
  7. ---
  8. xl2tpd-control.c | 3 ++-
  9. 1 file changed, 2 insertions(+), 1 deletion(-)
  10. --- a/xl2tpd-control.c
  11. +++ b/xl2tpd-control.c
  12. @@ -83,7 +83,8 @@ struct command_t commands[] = {
  13. {"available", &command_available, TUNNEL_NOT_REQUIRED},
  14. {"add-lns", &command_add_lns, TUNNEL_REQUIRED},
  15. {"status-lns", &command_status_lns, TUNNEL_REQUIRED},
  16. - {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED}
  17. + {"remove-lns", &command_remove_lns, TUNNEL_REQUIRED},
  18. + {},
  19. };
  20. void usage()