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.

78 lines
2.5 KiB

  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.0
  4. Patch-ID: bash50-015
  5. Bug-Reported-by: Yu Kou <ckyoog@gmail.com>
  6. Bug-Reference-ID: <CAAqoF9Ko3nAShJXGzucafs-ByUagzZ4nbQonwEkwC7s9UqfWKw@mail.gmail.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-05/msg00032.html
  8. Bug-Description:
  9. If alias expansion is enabled when processing the command argument to the
  10. `-c' option, an alias is defined in that command, and the command ends with
  11. the invocation of that alias, the shell's command parser can prematurely
  12. terminate before the entire command is executed.
  13. Patch (apply with `patch -p0'):
  14. *** a/builtins/evalstring.c 2019-01-29 14:15:19.000000000 -0500
  15. --- b/builtins/evalstring.c 2019-05-15 14:19:36.000000000 -0400
  16. ***************
  17. *** 92,95 ****
  18. --- 92,96 ----
  19. running_trap == 0 &&
  20. *bash_input.location.string == '\0' &&
  21. + parser_expanding_alias () == 0 &&
  22. command->type == cm_simple &&
  23. signal_is_trapped (EXIT_TRAP) == 0 &&
  24. ***************
  25. *** 106,109 ****
  26. --- 107,111 ----
  27. {
  28. return (*bash_input.location.string == '\0' &&
  29. + parser_expanding_alias () == 0 &&
  30. (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
  31. command->value.Connection->second->type == cm_simple);
  32. ***************
  33. *** 291,295 ****
  34. with_input_from_string (string, from_file);
  35. clear_shell_input_line ();
  36. ! while (*(bash_input.location.string))
  37. {
  38. command = (COMMAND *)NULL;
  39. --- 293,297 ----
  40. with_input_from_string (string, from_file);
  41. clear_shell_input_line ();
  42. ! while (*(bash_input.location.string) || parser_expanding_alias ())
  43. {
  44. command = (COMMAND *)NULL;
  45. ***************
  46. *** 546,550 ****
  47. with_input_from_string (string, from_file);
  48. ! while (*(bash_input.location.string))
  49. {
  50. command = (COMMAND *)NULL;
  51. --- 548,552 ----
  52. with_input_from_string (string, from_file);
  53. ! while (*(bash_input.location.string)) /* XXX - parser_expanding_alias () ? */
  54. {
  55. command = (COMMAND *)NULL;
  56. *** a/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  57. --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  58. ***************
  59. *** 26,30 ****
  60. looks for to find the patch level (for the sccs version string). */
  61. ! #define PATCHLEVEL 14
  62. #endif /* _PATCHLEVEL_H_ */
  63. --- 26,30 ----
  64. looks for to find the patch level (for the sccs version string). */
  65. ! #define PATCHLEVEL 15
  66. #endif /* _PATCHLEVEL_H_ */