Commit 5b870a76 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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

This fixes https://savannah.gnu.org/bugs/?53157.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment