bash32-033 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 3.2
  4. Patch-ID: bash32-033
  5. Bug-Reported-by: Christophe Martin <schplurtz@free.fr>
  6. Bug-Reference-ID: <465ABA4A.3030805@free.fr>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-05/msg00104.html
  8. Bug-Description:
  9. References made within a function to an uninitialized local array variable
  10. using the [*] subscript in a double-quoted string can result in spurious
  11. ASCII 127 characters in the expanded value.
  12. Patch:
  13. *** bash-3.2-patched/arrayfunc.c 2007-08-25 13:47:05.000000000 -0400
  14. --- bash-3.2/arrayfunc.c 2007-05-31 11:55:46.000000000 -0400
  15. ***************
  16. *** 723,727 ****
  17. {
  18. if (rtype)
  19. ! *rtype = 1;
  20. if (allow_all == 0)
  21. {
  22. --- 723,727 ----
  23. {
  24. if (rtype)
  25. ! *rtype = (t[0] == '*') ? 1 : 2;
  26. if (allow_all == 0)
  27. {
  28. *** bash-3.2-patched/subst.c 2007-08-25 13:47:08.000000000 -0400
  29. --- bash-3.2/subst.c 2007-11-14 15:43:00.000000000 -0500
  30. ***************
  31. *** 4908,4915 ****
  32. intmax_t arg_index;
  33. SHELL_VAR *var;
  34. ! int atype;
  35. ret = 0;
  36. temp = 0;
  37. /* Handle multiple digit arguments, as in ${11}. */
  38. --- 4973,4981 ----
  39. intmax_t arg_index;
  40. SHELL_VAR *var;
  41. ! int atype, rflags;
  42. ret = 0;
  43. temp = 0;
  44. + rflags = 0;
  45. /* Handle multiple digit arguments, as in ${11}. */
  46. ***************
  47. *** 4944,4947 ****
  48. --- 5010,5015 ----
  49. ? quote_string (temp)
  50. : quote_escapes (temp);
  51. + else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
  52. + rflags |= W_HASQUOTEDNULL;
  53. }
  54. #endif
  55. ***************
  56. *** 4971,4974 ****
  57. --- 5039,5043 ----
  58. ret = alloc_word_desc ();
  59. ret->word = temp;
  60. + ret->flags |= rflags;
  61. }
  62. return ret;
  63. *** bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
  64. --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
  65. ***************
  66. *** 26,30 ****
  67. looks for to find the patch level (for the sccs version string). */
  68. ! #define PATCHLEVEL 32
  69. #endif /* _PATCHLEVEL_H_ */
  70. --- 26,30 ----
  71. looks for to find the patch level (for the sccs version string). */
  72. ! #define PATCHLEVEL 33
  73. #endif /* _PATCHLEVEL_H_ */