If the string was ending with '\', there was a write after the allocated
area, which would overwrite some malloc information, hence the error.

The following fixes it for me:

--- bash/bashline.c     2009-12-17 02:13:36.000000000 +0100
+++ /tmp/bashline.c     2009-12-17 02:12:10.000000000 +0100
@@ -3223,9 +3223,10 @@
          else if (quoted == '"' && ((sh_syntaxtab[p[1]] & CBSDQUOTE) == 0))
            *r++ = *p;
 
-         *r++ = *++p;
-         if (*p == '\0')
+         if (*++p == '\0')
            break;
+
+         *r++ = *p;
          continue;
        }
       /* Close quote. */


Cheers,

Benoit

** Also affects: gnubash
   Importance: Undecided
       Status: New

-- 
crash when completing a single-quoted word which ends with a backslash
https://bugs.launchpad.net/bugs/476736
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to