On 7/6/25 12:30 PM, Tobias Powalowski wrote:
Hi,we encountered an issue in iwd yesterday, now a sample code of reproducing the issue is also available: https://gitlab.archlinux.org/archlinux/packaging/packages/readline/-/issues/1 Any assistance in solving the issue is very appreciated.
Thanks for the reproducer in the Arch report. Readline doesn't contemplate an application calling rl_save_prompt, which sets the prompt string to NULL, without calling rl_set_prompt to set it to something new, maybe as part of a call to rl_message. That said, it shouldn't crash the application. Try the attached patch. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
*** ../readline-8.3/display.c Fri May 2 09:20:32 2025 --- display.c Sun Jul 6 17:16:28 2025 *************** *** 784,788 **** /* 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 W_OFFSET(line, offset) ((line) == 0 ? offset : 0) --- 784,788 ---- /* 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) ? local_prompt_invis_chars[line] : 0) #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
OpenPGP_signature.asc
Description: OpenPGP digital signature