vl_method_extend() accepted an empty text/data value and measured an
empty word, bypassing the empty-word refusal the CLI path already
enforces. Measured words are joined with ":" in the record, so an empty
word is ambiguous. Reject it.
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
else
return sd_varlink_error_invalid_parameter_name(link, "text");
+ if (!iovec_is_set(extend_iovec))
+ return sd_varlink_error_invalid_parameter_name(link, p.text ? "text" : "data");
+
if (p.nvpcr) {
r = extend_nvpcr_now(p.nvpcr, extend_iovec->iov_base, extend_iovec->iov_len, p.event_type);
if (IN_SET(r, -ENOENT, -ENODEV))