bash/bash-4.2-xdupmbstowcs2-patch

20 lines
578 B
Plaintext
Raw Normal View History

*** ../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;