nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash-4.2-history-hang.patch

07a490
--- a/lib/readline/history.c	2014-05-27 16:55:58.040214069 +0200
07a490
+++ b/lib/readline/history.c	2014-05-27 16:56:11.243204928 +0200
07a490
@@ -318,7 +318,7 @@ add_history_time (string)
07a490
 {
07a490
   HIST_ENTRY *hs;
07a490
 
07a490
-  if (string == 0)
07a490
+  if (string == 0 || history_length < 1)
07a490
     return;
07a490
   hs = the_history[history_length - 1];
07a490
   FREE (hs->timestamp);