From 44c78181413e1e1a90d7512078fe8218b564271a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 21 Aug 2008 09:38:18 +0200 Subject: [PATCH] src/utils_parse_option.c: Check for the terminating null-byte, too. I was so focused on values with spaces, that I forgot to test trivial cases :/ --- src/utils_parse_option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_parse_option.c b/src/utils_parse_option.c index 06e9f280..6ed2301f 100644 --- a/src/utils_parse_option.c +++ b/src/utils_parse_option.c @@ -100,7 +100,7 @@ int parse_option (char **ret_buffer, char **ret_key, char **ret_value) else /* an unquoted value */ { buffer = value; - while (!isspace ((int) *buffer)) + while ((*buffer != 0) && !isspace ((int) *buffer)) buffer++; if (*buffer != 0) { -- 2.30.2