bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash-3.2 Official Patch 49


From: Chet Ramey
Subject: Bash-3.2 Official Patch 49
Date: Thu, 18 Jun 2009 17:41:15 -0400

                             BASH PATCH REPORT
                             =================

Bash-Release: 3.2
Patch-ID: bash32-049

Bug-Reported-by:        Len Lattanzi <llattanzi@apple.com>
Bug-Reference-ID:       <52B1297F-6675-45CC-B63E-24745337D006@apple.com>
Bug-Reference-URL:      

Bug-Description:

On systems where mbrtowc() returns -2 when passed a length argument with
value 0, when using a multibyte locale, Readline's emacs-mode forward-char
at the end of a line will leave the point beyond the end of the line.

Patch:

*** ../bash-3.2-patched/lib/readline/mbutil.c   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))
        {
*** ../bash-3.2/patchlevel.h    Thu Apr 13 08:31:04 2006
--- patchlevel.h        Mon Oct 16 14:22:54 2006
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 48
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 49
  
  #endif /* _PATCHLEVEL_H_ */

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

Chet Ramey, ITS, CWRU    chet@case.edu    http://tiswww.tis.case.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]