rcfile: don't crash when a bind to a string lacks the closing quote

This fixes https://savannah.gnu.org/bugs/?53972.
Reported-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
master
Benno Schulenberg 2018-05-24 20:07:39 +02:00
parent 3757683e3f
commit 119a6f0de3
1 changed files with 2 additions and 1 deletions

View File

@ -400,7 +400,8 @@ void parse_binding(char *ptr, bool dobind)
if (funcptr[0] == '\0') { if (funcptr[0] == '\0') {
rcfile_error(N_("Must specify a function to bind the key to")); rcfile_error(N_("Must specify a function to bind the key to"));
goto free_things; goto free_things;
} } else if (ptr == NULL)
goto free_things;
} }
menuptr = ptr; menuptr = ptr;