rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

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

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