1
0

140-upstream-bash43-040.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-040
  5. Bug-Reported-by: Jean Delvare <jdelvare@suse.de>
  6. Bug-Reference-ID: <20150609180231.5f463695@endymion.delvare>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00033.html
  8. Bug-Description:
  9. There is a memory leak that occurs when bash expands an array reference on
  10. the rhs of an assignment statement.
  11. Patch (apply with `patch -p0'):
  12. --- a/subst.c
  13. +++ b/subst.c
  14. @@ -5782,7 +5782,7 @@ expand_arrayref:
  15. /* XXX - does this leak if name[@] or name[*]? */
  16. if (pflags & PF_ASSIGNRHS)
  17. {
  18. - temp = array_variable_name (name, &tt, (int *)0);
  19. + var = array_variable_part (name, &tt, (int *)0);
  20. if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
  21. temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
  22. else
  23. --- a/patchlevel.h
  24. +++ b/patchlevel.h
  25. @@ -25,6 +25,6 @@
  26. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  27. looks for to find the patch level (for the sccs version string). */
  28. -#define PATCHLEVEL 39
  29. +#define PATCHLEVEL 40
  30. #endif /* _PATCHLEVEL_H_ */