aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--util/string-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/string-util.c b/util/string-util.c
index aba9aa83..a5622d7a 100644
--- a/util/string-util.c
+++ b/util/string-util.c
@@ -127,7 +127,7 @@ parse_boolean_term (void *ctx, const char *str,
/* Parse prefix */
str = skip_space (str);
const char *pos = strchr (str, ':');
- if (! pos)
+ if (! pos || pos == str)
goto FAIL;
*prefix_out = talloc_strndup (ctx, str, pos - str);
if (! *prefix_out) {