X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Fstring-util.c;h=a5622d7a209dfee96b90e5e3dbd698cc455ad6df;hp=aba9aa836e6522c7c51be56458dfee6fd48618cb;hb=b4b22d37144c7820b435cea500fa4cfd1088b191;hpb=bd829fde9640cf23482b3f1dfe2007ef38f2b24a 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) {