Jan Hnatek wrote:
> Hi,
> 
> bash-3.2 on Solaris is suffering from the following bug:
>  http://defect.opensolaris.org/bz/show_bug.cgi?id=3743
>  (bash hangs sometimes when navigating with the arrow keys)

The problem is that different implementations of mbrtowc return different
values when `n' is 0.  Try this patch; it fixes that underlying problem.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
*** lib/readline/mbutil.c.orig  2009-05-29 23:09:26.000000000 -0400
--- lib/readline/mbutil.c       2009-05-29 23:10:12.000000000 -0400
***************
*** 78,82 ****
       int seed, count, find_non_zero;
  {
!   size_t tmp;
    mbstate_t ps;
    int point;
--- 78,82 ----
       int seed, count, find_non_zero;
  {
!   size_t tmp, len;
    mbstate_t ps;
    int point;
***************
*** 99,103 ****
    while (count > 0)  
      {
!       tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps);
        if (MB_INVALIDCH ((size_t)tmp))
        {
--- 99,106 ----
    while (count > 0)  
      {
!       len = strlen (string + point);
!       if (len == 0)
!       break;
!       tmp = mbrtowc (&wc, string+point, len, &ps);
        if (MB_INVALIDCH ((size_t)tmp))
        {

Reply via email to