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.

33 lines
1.2 KiB

  1. From a208d4dd73794b67a59dae7e3077378473650d6c Mon Sep 17 00:00:00 2001
  2. From: Christopher Faulet <cfaulet@haproxy.com>
  3. Date: Thu, 23 Feb 2017 22:41:09 +0100
  4. Subject: [PATCH 3/7] BUG/MINOR: spoe: Fix parsing of arguments in spoe-message
  5. section
  6. The array of pointers passed to sample_parse_expr was not really an array but a
  7. pointer to pointer. So it can easily lead to a segfault during the configuration
  8. parsing.
  9. (cherry picked from commit b0b42388259224be54bf504fa559803b39d6453c)
  10. ---
  11. src/flt_spoe.c | 5 +++--
  12. 1 file changed, 3 insertions(+), 2 deletions(-)
  13. diff --git a/src/flt_spoe.c b/src/flt_spoe.c
  14. index 2a96c65..57fb1da 100644
  15. --- a/src/flt_spoe.c
  16. +++ b/src/flt_spoe.c
  17. @@ -2966,8 +2966,9 @@ cfg_parse_spoe_message(const char *file, int linenum, char **args, int kwm)
  18. arg->name_len = delim - args[cur_arg];
  19. delim++;
  20. }
  21. -
  22. - arg->expr = sample_parse_expr(&delim, &idx, file, linenum, &errmsg, &curproxy->conf.args);
  23. + arg->expr = sample_parse_expr((char*[]){delim, NULL},
  24. + &idx, file, linenum, &errmsg,
  25. + &curproxy->conf.args);
  26. if (arg->expr == NULL) {
  27. Alert("parsing [%s:%d] : '%s': %s.\n", file, linenum, args[0], errmsg);
  28. err_code |= ERR_ALERT | ERR_FATAL;
  29. --
  30. 2.10.2