Blame SOURCES/bash-4.4-patch-1.patch

50ece2
From 8ddc8d6e3a3d85eec6d4ba9b9ed2bc36bce56716 Mon Sep 17 00:00:00 2001
50ece2
From: Chet Ramey <chet.ramey@case.edu>
50ece2
Date: Mon, 14 Nov 2016 14:26:51 -0500
50ece2
Subject: [PATCH] Bash-4.4 patch 1
50ece2
50ece2
---
50ece2
 lib/readline/history.c | 6 +++++-
50ece2
 patchlevel.h           | 2 +-
50ece2
 2 files changed, 6 insertions(+), 2 deletions(-)
50ece2
50ece2
diff --git a/lib/readline/history.c b/lib/readline/history.c
50ece2
index 3b8dbc5..9ff25a7 100644
50ece2
--- a/lib/readline/history.c
50ece2
+++ b/lib/readline/history.c
50ece2
@@ -57,6 +57,8 @@ extern int errno;
50ece2
 /* How big to make the_history when we first allocate it. */
50ece2
 #define DEFAULT_HISTORY_INITIAL_SIZE	502
50ece2
 
50ece2
+#define MAX_HISTORY_INITIAL_SIZE	8192
50ece2
+
50ece2
 /* The number of slots to increase the_history by. */
50ece2
 #define DEFAULT_HISTORY_GROW_SIZE 50
50ece2
 
50ece2
@@ -307,7 +309,9 @@ add_history (string)
50ece2
       if (history_size == 0)
50ece2
 	{
50ece2
 	  if (history_stifled && history_max_entries > 0)
50ece2
-	    history_size = history_max_entries + 2;
50ece2
+	    history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
50ece2
+				? MAX_HISTORY_INITIAL_SIZE
50ece2
+				: history_max_entries + 2;
50ece2
 	  else
50ece2
 	    history_size = DEFAULT_HISTORY_INITIAL_SIZE;
50ece2
 	  the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
50ece2
diff --git a/patchlevel.h b/patchlevel.h
50ece2
index 1cd7c96..40db1a3 100644
50ece2
--- a/patchlevel.h
50ece2
+++ b/patchlevel.h
50ece2
@@ -25,6 +25,6 @@
50ece2
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
50ece2
    looks for to find the patch level (for the sccs version string). */
50ece2
 
50ece2
-#define PATCHLEVEL 0
50ece2
+#define PATCHLEVEL 1
50ece2
 
50ece2
 #endif /* _PATCHLEVEL_H_ */
50ece2
-- 
50ece2
2.9.3
50ece2