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

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