bash44-002 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.4
  4. Patch-ID: bash44-002
  5. Bug-Reported-by: Eric Pruitt <eric.pruitt@gmail.com>
  6. Bug-Reference-ID: <20160916055120.GA28272@sinister.codevat.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html
  8. Bug-Description:
  9. Bash-4.4 warns when discarding NUL bytes in command substitution output
  10. instead of silently dropping them. This patch changes the warnings from
  11. one per NUL byte encountered to one warning per command substitution.
  12. Patch (apply with `patch -p0'):
  13. *** ../bash-4.4/subst.c 2016-08-30 16:46:38.000000000 -0400
  14. --- subst.c 2016-09-26 10:20:19.000000000 -0400
  15. ***************
  16. *** 5932,5935 ****
  17. --- 5933,5937 ----
  18. int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
  19. ssize_t bufn;
  20. + int nullbyte;
  21. istring = (char *)NULL;
  22. ***************
  23. *** 5939,5942 ****
  24. --- 5941,5946 ----
  25. skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
  26. + nullbyte = 0;
  27. +
  28. /* Read the output of the command through the pipe. This may need to be
  29. changed to understand multibyte characters in the future. */
  30. ***************
  31. *** 5957,5961 ****
  32. {
  33. #if 1
  34. ! internal_warning ("%s", _("command substitution: ignored null byte in input"));
  35. #endif
  36. continue;
  37. --- 5961,5969 ----
  38. {
  39. #if 1
  40. ! if (nullbyte == 0)
  41. ! {
  42. ! internal_warning ("%s", _("command substitution: ignored null byte in input"));
  43. ! nullbyte = 1;
  44. ! }
  45. #endif
  46. continue;
  47. *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  48. --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  49. ***************
  50. *** 26,30 ****
  51. looks for to find the patch level (for the sccs version string). */
  52. ! #define PATCHLEVEL 1
  53. #endif /* _PATCHLEVEL_H_ */
  54. --- 26,30 ----
  55. looks for to find the patch level (for the sccs version string). */
  56. ! #define PATCHLEVEL 2
  57. #endif /* _PATCHLEVEL_H_ */