rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

Blame SOURCES/bash-5.1-mbrtowc.patch

9176d8
diff --git a/subst.c b/subst.c
9176d8
--- a/subst.c
9176d8
+++ b/subst.c
9176d8
@@ -6240,7 +6240,7 @@ read_comsub (fd, quoted, flags, rflag)
9176d8
 	  /* read a multibyte character from buf */
9176d8
 	  /* punt on the hard case for now */
9176d8
 	  memset (&ps, '\0', sizeof (mbstate_t));
9176d8
-	  mblen = mbrtowc (&wc, bufp-1, bufn+1, &ps);
9176d8
+	  mblen = mbrtowc (&wc, bufp-1, bufn, &ps);
9176d8
 	  if (MB_INVALIDCH (mblen) || mblen == 0 || mblen == 1)
9176d8
 	    istring[istring_index++] = c;
9176d8
 	  else