From: Chet Ramey Date: Fri, 17 Nov 2023 21:00:59 +0000 (-0500) Subject: Readline-8.2 patch 2: avoid possible crash when trying to zero out a line buffer... X-Git-Tag: readline-8.3-alpha~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83de95eaba5debdf544d0ef43cf88de3bc5cd7dd;p=thirdparty%2Freadline.git Readline-8.2 patch 2: avoid possible crash when trying to zero out a line buffer that's potentially not null-terminated --- diff --git a/display.c b/display.c index c1135ec..ad573f9 100644 --- a/display.c +++ b/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 b/patchlevel index fdf4740..7cbda82 100644 --- a/patchlevel +++ b/patchlevel @@ -1,3 +1,3 @@ # Do not edit -- exists only for use by patch -1 +2