Skip to content
Snippets Groups Projects
Commit e19e3b7d authored by Daniel Salzman's avatar Daniel Salzman
Browse files

knsupdate: don't crash if missing prereq parameters

parent 4ce5fdd6
No related merge requests found
Pipeline #94482 passed with stages
in 5 minutes and 14 seconds
This commit is part of merge request !1428. Comments created here will be created in the context of that merge request.
......@@ -770,6 +770,10 @@ int cmd_prereq(const char* lp, knsupdate_params_t *params)
const char *tok = pq_array[prereq_type];
DBG("%s: type %s\n", __func__, TOK_S(tok));
lp = tok_skipspace(lp + TOK_L(tok));
if (strlen(lp) == 0) {
ERR("missing prerequisite owner name\n");
return KNOT_EINVAL;
}
int ret = KNOT_EOK;
switch(prereq_type) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment