In tini, allow_empty_value=false causes the parser to ignore the lines
without '=' sign, but lines with nothing after '=' sign are allowed and
cause empty string ("") to be passed as a value.
This is counter-intuitive, so conf requires special handling for empty
values (which are treated as invalid).
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
}
}
+ if (strlen(value_str) == 0) {
+ D_ERR("conf: empty value [%s] -> \"%s\"\n",
+ state->s->name,
+ name);
+ state->err = EINVAL;
+ return true;
+ }
+
tmp_ctx = talloc_new(state->conf);
if (tmp_ctx == NULL) {
state->err = ENOMEM;