diff --git a/src/core/service.c b/src/core/service.c index f346e38b66..d448d558db 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2790,13 +2790,14 @@ static int service_deserialize_exec_command( 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++) {