bash-4.1-008.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.1
  4. Patch-ID: bash41-008
  5. Bug-Reported-by: Dennis van Dok <dvandok@gmail.com>
  6. Bug-Reference-ID: <4BBF2501.5050703@gmail.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-04/msg00038.html
  8. Bug-Description:
  9. When declaring an associative array and implicitly assigning a value
  10. to element "0", bash does not correctly allocate memory, leading to
  11. a segmentation violation when that element or the array itself is
  12. unset.
  13. Patch (apply with `patch -p0'):
  14. *** ../bash-4.1-patched/builtins/declare.def 2009-11-25 19:42:00.000000000 -0500
  15. --- ./builtins/declare.def 2010-05-30 18:25:21.000000000 -0400
  16. ***************
  17. *** 513,517 ****
  18. /* let bind_{array,assoc}_variable take care of this. */
  19. if (assoc_p (var))
  20. ! bind_assoc_variable (var, name, "0", value, aflags);
  21. else
  22. bind_array_variable (name, 0, value, aflags);
  23. --- 519,523 ----
  24. /* let bind_{array,assoc}_variable take care of this. */
  25. if (assoc_p (var))
  26. ! bind_assoc_variable (var, name, savestring ("0"), value, aflags);
  27. else
  28. bind_array_variable (name, 0, value, aflags);
  29. *** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
  30. --- ./patchlevel.h 2010-01-14 09:38:08.000000000 -0500
  31. ***************
  32. *** 26,30 ****
  33. looks for to find the patch level (for the sccs version string). */
  34. ! #define PATCHLEVEL 7
  35. #endif /* _PATCHLEVEL_H_ */
  36. --- 26,30 ----
  37. looks for to find the patch level (for the sccs version string). */
  38. ! #define PATCHLEVEL 8
  39. #endif /* _PATCHLEVEL_H_ */