]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.2 patch 22: fix readline attempting to zero out a line that is not null-terminated
authorChet Ramey <chet.ramey@case.edu>
Sat, 13 Jan 2024 23:19:59 +0000 (18:19 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sat, 13 Jan 2024 23:19:59 +0000 (18:19 -0500)
lib/readline/display.c
patchlevel.h

index c1135ec59294a394e8b852b37c2e4d420a3dca87..ad573f9a42652b35b3514231fbd890e37b8d4bf8 100644 (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) ();
index 1712b108f073b4febac77414d3f6e2a2970c93f4..e5e8cabd778e31a763745ceba880c4fccc3b4555 100644 (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_ */