Skip to content

Commit 8ddc8d6

Browse files
author
Chet Ramey
committed
Bash-4.4 patch 1
1 parent a0c0a00 commit 8ddc8d6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/readline/history.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ extern int errno;
5757
/* How big to make the_history when we first allocate it. */
5858
#define DEFAULT_HISTORY_INITIAL_SIZE 502
5959

60+
#define MAX_HISTORY_INITIAL_SIZE 8192
61+
6062
/* The number of slots to increase the_history by. */
6163
#define DEFAULT_HISTORY_GROW_SIZE 50
6264

@@ -307,7 +309,9 @@ add_history (string)
307309
if (history_size == 0)
308310
{
309311
if (history_stifled && history_max_entries > 0)
310-
history_size = history_max_entries + 2;
312+
history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
313+
? MAX_HISTORY_INITIAL_SIZE
314+
: history_max_entries + 2;
311315
else
312316
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
313317
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));

patchlevel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
2626
looks for to find the patch level (for the sccs version string). */
2727

28-
#define PATCHLEVEL 0
28+
#define PATCHLEVEL 1
2929

3030
#endif /* _PATCHLEVEL_H_ */

0 commit comments

Comments
 (0)