SOURCES: readline-read-e-segfault.patch (NEW), readline-wrap.patch...

arekm arekm at pld-linux.org
Tue Sep 20 12:27:11 CEST 2005


Author: arekm                        Date: Tue Sep 20 10:27:11 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix segfault at read -e and segfault when cmdline is longer than screen

---- Files affected:
SOURCES:
   readline-read-e-segfault.patch (NONE -> 1.1)  (NEW), readline-wrap.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/readline-read-e-segfault.patch
diff -u /dev/null SOURCES/readline-read-e-segfault.patch:1.1
--- /dev/null	Tue Sep 20 12:27:11 2005
+++ SOURCES/readline-read-e-segfault.patch	Tue Sep 20 12:27:06 2005
@@ -0,0 +1,14 @@
+This comes from the bash package:
+
+--- readline-5.0/display.c.read-e-segfault	2005-01-18 11:46:06.563478820 +0000
++++ readline-5.0/display.c	2005-01-18 11:47:08.791587924 +0000
+@@ -335,7 +335,8 @@
+   FREE (local_prompt_prefix);
+ 
+   local_prompt = local_prompt_prefix = (char *)0;
+-  prompt_last_invisible = prompt_visible_length = 0;
++  prompt_last_invisible = prompt_invis_chars_first_line = 0;
++  prompt_visible_length = prompt_physical_chars = 0;
+ 
+   if (prompt == 0 || *prompt == 0)
+     return (0);

================================================================
Index: SOURCES/readline-wrap.patch
diff -u /dev/null SOURCES/readline-wrap.patch:1.1
--- /dev/null	Tue Sep 20 12:27:11 2005
+++ SOURCES/readline-wrap.patch	Tue Sep 20 12:27:06 2005
@@ -0,0 +1,17 @@
+--- readline-5.0/display.c.wrap	2005-01-18 12:34:39.489668286 +0000
++++ readline-5.0/display.c	2005-01-18 12:35:29.127187527 +0000
+@@ -622,10 +622,11 @@
+              
+       inv_lbreaks[++newlines] = temp;
+ #if defined (HANDLE_MULTIBYTE)
+-      lpos -= _rl_col_width (local_prompt, n0, num);
+-#else
+-      lpos -= _rl_screenwidth;
++      if (local_prompt)
++        lpos -= _rl_col_width (local_prompt, n0, num);
++      else
+ #endif
++      lpos -= _rl_screenwidth;
+     }
+ 
+   prompt_last_screen_line = newlines;
================================================================



More information about the pld-cvs-commit mailing list