mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 22:59:38 +03:00
goto: avoid a segfault, by initializing 'answer' when it is NULL
This fixes https://savannah.gnu.org/bugs/?53157.
This commit is contained in:
parent
0cf455bc48
commit
5b870a7632
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user