commit 119a6f0de33e7948bc60cd8a6992e7d19a027dc6
parent 3757683e3f86a0037e09c132980b3f1e8ec42783
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 24 May 2018 20:07:39 +0200
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>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -400,7 +400,8 @@ void parse_binding(char *ptr, bool dobind)
if (funcptr[0] == '\0') {
rcfile_error(N_("Must specify a function to bind the key to"));
goto free_things;
- }
+ } else if (ptr == NULL)
+ goto free_things;
}
menuptr = ptr;