bash/bash-4.2-xdupmbstowcs2-patch
Roman Rakus bd46d070dd Fix the infinite loop with invalid wide char. #684293
Signed-off-by: Roman Rakus <rrakus@redhat.com>
2011-03-15 12:22:29 +01:00

20 lines
578 B
Plaintext

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