7 Bug-Reported-by: platon7pronko@gmail.com
9 Bug-Reference-URL: https://savannah.gnu.org/patch/?10035
13 Bash may produce corrupted input if a multibyte character spans a 512-byte
14 boundary while reading the output of a command substitution.
16 Patch (apply with `patch -p0'):
18 *** ../bash-20210217/subst.c 2021-02-03 10:32:08.000000000 -0500
19 --- subst.c 2021-03-01 16:47:52.000000000 -0500
22 /* punt on the hard case for now */
23 memset (&ps, '\0', sizeof (mbstate_t));
24 ! mblen = mbrtowc (&wc, bufp-1, bufn+1, &ps);
25 if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1)
26 istring[istring_index++] = c;
28 /* punt on the hard case for now */
29 memset (&ps, '\0', sizeof (mbstate_t));
30 ! mblen = mbrtowc (&wc, bufp-1, bufn, &ps);
31 if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1)
32 istring[istring_index++] = c;
34 *** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
35 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
38 looks for to find the patch level (for the sccs version string). */
40 ! #define PATCHLEVEL 13
42 #endif /* _PATCHLEVEL_H_ */
44 looks for to find the patch level (for the sccs version string). */
46 ! #define PATCHLEVEL 14
48 #endif /* _PATCHLEVEL_H_ */