[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Warning: the patch for xdupmbstowcs2 to avoid loops breaks expansion
From: |
Dr. Werner Fink |
Subject: |
Warning: the patch for xdupmbstowcs2 to avoid loops breaks expansion |
Date: |
Tue, 22 Mar 2011 13:23:54 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
just to be noted, tha patch:
-----------------------------------------------------------------
*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.000000000
-0400
--- lib/glob/xmbsrtowcs.c 2011-03-14 14:22:11.000000000 -0400
***************
*** 174,180 ****
wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
/* Conversion failed. */
! if (wcslength == (size_t)-1)
{
free (wsbuf);
*destp = NULL;
--- 174,180 ----
wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
/* Conversion failed. */
! if (wcslength == 0 || wcslength == (size_t)-1)
{
free (wsbuf);
*destp = NULL;
-----------------------------------------------------------------
just breaks expansion like this one:
> mkdir aaa
> touch aaa/foo.a
> touch aaa/foo.b
> echo './aaa/foo'*
./aaa/foo*
in an arbitrary UTF-8 locale
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
- Warning: the patch for xdupmbstowcs2 to avoid loops breaks expansion,
Dr. Werner Fink <=