summaryrefslogtreecommitdiff
path: root/package/readline/readline51-003
blob: 7cfd7ff31a0e52f6930cca1e2510cca45a327ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
			   READLINE PATCH REPORT
			   =====================

Readline-Release: 5.1
Patch-ID: readline51-003

Bug-Reported-by: Bob Rossi <bob@brasko.net>
Bug-Reference-ID: <43F60606.80708@case.edu>
Bug-Reference-URL:

Bug-Description:

In some cases, readline will reference freed memory when attempting to
display a portion of the prompt.

Patch:

*** readline-5.1/readline.c	Tue Dec 20 17:38:29 2005
--- readline-5.1/readline.c	Fri Feb 17 22:54:22 2006
***************
*** 282,287 ****
--- 282,288 ----
  {
    FREE (rl_prompt);
    rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+   rl_display_prompt = rl_prompt ? rl_prompt : "";
  
    rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
    return 0;