bug-bash
[Top][All Lists]
Advanced

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

4.3-rc2: fix crash in rl_do_undo


From: Andreas Schwab
Subject: 4.3-rc2: fix crash in rl_do_undo
Date: Sat, 01 Feb 2014 20:04:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Type M-. (insert-last-argument) twice -> crash.

Andreas.

diff --git a/lib/readline/undo.c b/lib/readline/undo.c
index a3d4044..f30ccf3 100644
--- a/lib/readline/undo.c
+++ b/lib/readline/undo.c
@@ -237,7 +237,7 @@ rl_do_undo ()
       /* If we are editing a history entry, make sure the change is replicated
         in the history entry's line */
       cur = current_history ();
-      if ((UNDO_LIST *)cur->data == release)
+      if (cur != NULL && (UNDO_LIST *)cur->data == release)
        {
          temp = replace_history_entry (where_history (), rl_line_buffer, 
(histdata_t)rl_undo_list);
          xfree (temp->line);
-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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