nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 5b870a7632f14f88eeb2ca2a284ed3dd8f555bd1
parent 0cf455bc48ee95cdb6c420e139fc0abbbe3ed5ab
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 14 Feb 2018 18:18:46 +0100

goto: avoid a segfault, by initializing 'answer' when it is NULL

This fixes https://savannah.gnu.org/bugs/?53157.

Diffstat:
Msrc/prompt.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/prompt.c b/src/prompt.c @@ -617,7 +617,7 @@ int do_prompt(bool allow_tabs, bool allow_files, bottombars(menu); - if (answer != curranswer) + if (answer != curranswer || answer == NULL) answer = mallocstrcpy(answer, curranswer); #ifndef NANO_TINY