0040-patchlevel-40.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-040
  2. Signed-off-by: Gustavo Zacarias <gustavo@zacrias.com.ar>
  3. BASH PATCH REPORT
  4. =================
  5. Bash-Release: 4.3
  6. Patch-ID: bash43-040
  7. Bug-Reported-by: Jean Delvare <jdelvare@suse.de>
  8. Bug-Reference-ID: <20150609180231.5f463695@endymion.delvare>
  9. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00033.html
  10. Bug-Description:
  11. There is a memory leak that occurs when bash expands an array reference on
  12. the rhs of an assignment statement.
  13. Patch (apply with `patch -p0'):
  14. *** a/bash-4.3-patched/subst.c 2014-10-01 12:57:47.000000000 -0400
  15. --- b/subst.c 2015-06-22 09:16:53.000000000 -0400
  16. ***************
  17. *** 5783,5787 ****
  18. if (pflags & PF_ASSIGNRHS)
  19. {
  20. ! temp = array_variable_name (name, &tt, (int *)0);
  21. if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
  22. temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
  23. --- 5783,5787 ----
  24. if (pflags & PF_ASSIGNRHS)
  25. {
  26. ! var = array_variable_part (name, &tt, (int *)0);
  27. if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
  28. temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
  29. *** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
  30. --- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400
  31. ***************
  32. *** 26,30 ****
  33. looks for to find the patch level (for the sccs version string). */
  34. ! #define PATCHLEVEL 39
  35. #endif /* _PATCHLEVEL_H_ */
  36. --- 26,30 ----
  37. looks for to find the patch level (for the sccs version string). */
  38. ! #define PATCHLEVEL 40
  39. #endif /* _PATCHLEVEL_H_ */