57 lines
1.5 KiB
Diff
57 lines
1.5 KiB
Diff
|
From b595cb4f3aa7b7378999445e8b9be0811bdb1ec9 Mon Sep 17 00:00:00 2001
|
||
|
From: Remi Collet <remi@php.net>
|
||
|
Date: Tue, 21 Jan 2014 13:03:12 +0100
|
||
|
Subject: [PATCH 1/2] [libedit] readline: avoid SIGSEGV in clear_history()
|
||
|
|
||
|
... if called prior to using_history(). This needed to be worked around
|
||
|
in PHP: http://git.php.net/?p=php-src.git;a=commitdiff;h=31d67bd3
|
||
|
|
||
|
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1055409
|
||
|
---
|
||
|
src/readline.c | 3 +++
|
||
|
1 files changed, 3 insertions(+), 0 deletions(-)
|
||
|
|
||
|
diff --git a/src/readline.c b/src/readline.c
|
||
|
index 8cb43b9..a76a570 100644
|
||
|
--- a/src/readline.c
|
||
|
+++ b/src/readline.c
|
||
|
@@ -1479,6 +1479,9 @@ clear_history(void)
|
||
|
{
|
||
|
HistEvent ev;
|
||
|
|
||
|
+ if (h == NULL || e == NULL)
|
||
|
+ rl_initialize();
|
||
|
+
|
||
|
(void)history(h, &ev, H_CLEAR);
|
||
|
history_length = 0;
|
||
|
}
|
||
|
--
|
||
|
1.7.1
|
||
|
|
||
|
|
||
|
From ffe1db33353b4a95d6018b77190dfb0c8e2e7cf3 Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Vasik <ovasik@redhat.com>
|
||
|
Date: Wed, 24 Jul 2013 16:15:32 +0200
|
||
|
Subject: [PATCH 2/2] [libedit] examples/fileman.c: fix minor typo in a comment
|
||
|
|
||
|
---
|
||
|
examples/fileman.c | 2 +-
|
||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/examples/fileman.c b/examples/fileman.c
|
||
|
index 2d1a0d4..8cf89b3 100644
|
||
|
--- a/examples/fileman.c
|
||
|
+++ b/examples/fileman.c
|
||
|
@@ -3,7 +3,7 @@
|
||
|
to manipulate files and their modes.
|
||
|
|
||
|
NOTE: this was taken from the GNU Readline documentation and ported
|
||
|
- to libedit. A commad to output the history list was added.
|
||
|
+ to libedit. A command to output the history list was added.
|
||
|
|
||
|
*/
|
||
|
|
||
|
--
|
||
|
1.7.1
|
||
|
|