You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. Index: bash-4.4/lib/readline/history.c
  2. ===================================================================
  3. --- bash-4.4.orig/lib/readline/history.c
  4. +++ bash-4.4/lib/readline/history.c
  5. @@ -57,6 +57,8 @@ extern int errno;
  6. /* How big to make the_history when we first allocate it. */
  7. #define DEFAULT_HISTORY_INITIAL_SIZE 502
  8. +#define MAX_HISTORY_INITIAL_SIZE 8192
  9. +
  10. /* The number of slots to increase the_history by. */
  11. #define DEFAULT_HISTORY_GROW_SIZE 50
  12. @@ -307,7 +309,9 @@ add_history (string)
  13. if (history_size == 0)
  14. {
  15. if (history_stifled && history_max_entries > 0)
  16. - history_size = history_max_entries + 2;
  17. + history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
  18. + ? MAX_HISTORY_INITIAL_SIZE
  19. + : history_max_entries + 2;
  20. else
  21. history_size = DEFAULT_HISTORY_INITIAL_SIZE;
  22. the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
  23. Index: bash-4.4/patchlevel.h
  24. ===================================================================
  25. --- bash-4.4.orig/patchlevel.h
  26. +++ bash-4.4/patchlevel.h
  27. @@ -25,6 +25,6 @@
  28. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  29. looks for to find the patch level (for the sccs version string). */
  30. -#define PATCHLEVEL 0
  31. +#define PATCHLEVEL 1
  32. #endif /* _PATCHLEVEL_H_ */