139-upstream-bash43-039.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-039
  5. Bug-Reported-by: SN <poczta-sn@gazeta.pl>
  6. Bug-Reference-ID: <54E2554C.205@gazeta.pl>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html
  8. Bug-Description:
  9. Using the output of `declare -p' when run in a function can result in variables
  10. that are invisible to `declare -p'. This problem occurs when an assignment
  11. builtin such as `declare' receives a quoted compound array assignment as one of
  12. its arguments.
  13. Patch (apply with `patch -p0'):
  14. --- a/arrayfunc.c
  15. +++ b/arrayfunc.c
  16. @@ -404,6 +404,9 @@ assign_array_var_from_word_list (var, li
  17. (*var->assign_func) (var, l->word->word, i, 0);
  18. else
  19. array_insert (a, i, l->word->word);
  20. +
  21. + VUNSETATTR (var, att_invisible); /* no longer invisible */
  22. +
  23. return var;
  24. }
  25. @@ -634,6 +637,10 @@ assign_array_var_from_string (var, value
  26. if (nlist)
  27. dispose_words (nlist);
  28. +
  29. + if (var)
  30. + VUNSETATTR (var, att_invisible); /* no longer invisible */
  31. +
  32. return (var);
  33. }
  34. --- a/patchlevel.h
  35. +++ b/patchlevel.h
  36. @@ -25,6 +25,6 @@
  37. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  38. looks for to find the patch level (for the sccs version string). */
  39. -#define PATCHLEVEL 38
  40. +#define PATCHLEVEL 39
  41. #endif /* _PATCHLEVEL_H_ */