I'm pretty sure that bad things would happen later on.
return -ENOMEM;
break;
default:
- assert_not_reached("Unknown error at deserialization of exec command");
- break;
+ assert_not_reached("Logic error in exec command deserialization");
}
}
if (state != STATE_EXEC_COMMAND_ARGS)
return -EINVAL;
+ if (strv_isempty(argv))
+ return -EINVAL; /* At least argv[0] must be always present. */
/* Let's check whether exec command on given offset matches data that we just deserialized */
for (command = s->exec_command[id], i = 0; command; command = command->command_next, i++) {