bash-4.2-024.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.2
  4. Patch-ID: bash42-024
  5. Bug-Reported-by: Jim Avera <james_avera@yahoo.com>
  6. Bug-Reference-ID: <4F29E07A.80405@yahoo.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html
  8. Bug-Description:
  9. When `printf -v' is used to set an array element, the format string contains
  10. `%b', and the corresponding argument is the empty string, the buffer used
  11. to store the value to be assigned can be NULL, which results in NUL being
  12. assigned to the array element. This causes a seg fault when it's used later.
  13. Patch (apply with `patch -p0'):
  14. *** ../bash-4.2-patched/builtins/printf.def 2011-02-25 12:07:41.000000000 -0500
  15. --- ./builtins/printf.def 2012-02-02 08:37:12.000000000 -0500
  16. ***************
  17. *** 256,259 ****
  18. --- 257,262 ----
  19. {
  20. vflag = 1;
  21. + if (vbsize == 0)
  22. + vbuf = xmalloc (vbsize = 16);
  23. vblen = 0;
  24. if (vbuf)
  25. *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
  26. --- ./patchlevel.h Thu Feb 24 21:41:34 2011
  27. ***************
  28. *** 26,30 ****
  29. looks for to find the patch level (for the sccs version string). */
  30. ! #define PATCHLEVEL 23
  31. #endif /* _PATCHLEVEL_H_ */
  32. --- 26,30 ----
  33. looks for to find the patch level (for the sccs version string). */
  34. ! #define PATCHLEVEL 24
  35. #endif /* _PATCHLEVEL_H_ */