1
0

107-upstream-bash43-007.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-007
  5. Bug-Reported-by: geir.hauge@gmail.com
  6. Bug-Reference-ID: <20140318093650.B181C1C5B0B@gina.itea.ntnu.no>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00095.html
  8. Bug-Description:
  9. Using compound assignments for associative arrays like
  10. assoc=( [x]= [y]=bar )
  11. left the value corresponding to the key `x' NULL. This caused subsequent
  12. lookups to interpret it as unset.
  13. Patch (apply with `patch -p0'):
  14. --- a/arrayfunc.c
  15. +++ b/arrayfunc.c
  16. @@ -597,6 +597,11 @@ assign_compound_array_list (var, nlist,
  17. if (assoc_p (var))
  18. {
  19. val = expand_assignment_string_to_string (val, 0);
  20. + if (val == 0)
  21. + {
  22. + val = (char *)xmalloc (1);
  23. + val[0] = '\0'; /* like do_assignment_internal */
  24. + }
  25. free_val = 1;
  26. }
  27. --- a/patchlevel.h
  28. +++ b/patchlevel.h
  29. @@ -25,6 +25,6 @@
  30. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  31. looks for to find the patch level (for the sccs version string). */
  32. -#define PATCHLEVEL 6
  33. +#define PATCHLEVEL 7
  34. #endif /* _PATCHLEVEL_H_ */