From: Chet Ramey Date: Wed, 10 Dec 2025 16:34:13 +0000 (-0500) Subject: Readline-8.3 patch 2: fix crash if the calling application sets rl_prompt to NULL... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a3a2388e376eb2b43a2fe3dd8c5ce6e62ee3cc0;p=thirdparty%2Freadline.git Readline-8.3 patch 2: fix crash if the calling application sets rl_prompt to NULL without setting a new value --- diff --git a/display.c b/display.c index 9aa8c7b..edb525d 100644 --- a/display.c +++ b/display.c @@ -783,7 +783,7 @@ _rl_optimize_redisplay (void) /* Useful shorthand used by rl_redisplay, update_line, rl_move_cursor_relative */ #define INVIS_FIRST() (local_prompt_invis_chars[0]) -#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line) ? local_prompt_invis_chars[line] : 0) +#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line && local_prompt_invis_chars) ? local_prompt_invis_chars[line] : 0) #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) 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