svashisht / rpms / bash

Forked from rpms/bash 4 years ago
Clone

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

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