From: Chet Ramey Date: Sat, 13 Jan 2024 23:19:59 +0000 (-0500) Subject: Bash-5.2 patch 22: fix readline attempting to zero out a line that is not null-terminated X-Git-Tag: bash-5.3-alpha~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a2f3d51391de5329650b4f8f62eebb0def25858;p=thirdparty%2Fbash.git Bash-5.2 patch 22: fix readline attempting to zero out a line that is not null-terminated --- diff --git a/lib/readline/display.c b/lib/readline/display.c index c1135ec59..ad573f9a4 100644 --- a/lib/readline/display.c +++ b/lib/readline/display.c @@ -2683,11 +2683,8 @@ rl_forced_update_display (void) register char *temp; if (visible_line) - { - temp = visible_line; - while (*temp) - *temp++ = '\0'; - } + memset (visible_line, 0, line_size); + rl_on_new_line (); forced_display++; (*rl_redisplay_function) (); diff --git a/patchlevel.h b/patchlevel.h index 1712b108f..e5e8cabd7 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 21 +#define PATCHLEVEL 22 #endif /* _PATCHLEVEL_H_ */