We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28a5943 commit a1666cbCopy full SHA for a1666cb
tools/net/ynl/lib/ynl.c
@@ -364,7 +364,7 @@ int ynl_attr_validate(struct ynl_parse_arg *yarg, const struct nlattr *attr)
364
"Invalid attribute (binary %s)", policy->name);
365
return -1;
366
case YNL_PT_NUL_STR:
367
- if ((!policy->len || len <= policy->len) && !data[len - 1])
+ if (len && (!policy->len || len <= policy->len) && !data[len - 1])
368
break;
369
yerr(yarg->ys, YNL_ERROR_ATTR_INVALID,
370
"Invalid attribute (string %s)", policy->name);
0 commit comments