Bash-5.2 patch 22: fix readline attempting to zero out a line that is not null-terminated

This commit is contained in:
Chet Ramey
2024-01-13 18:19:59 -05:00
parent 4b0f8ba284
commit 1a2f3d5139
2 changed files with 3 additions and 6 deletions
+2 -5
View File
@@ -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) ();
+1 -1
View File
@@ -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_ */