Commit 6632b2a4 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

criu: Require @fd argument for "swrk" mode

Otherwise we hit nil dereference.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent fe946bf4
...@@ -269,6 +269,8 @@ int main(int argc, char *argv[], char *envp[]) ...@@ -269,6 +269,8 @@ int main(int argc, char *argv[], char *envp[])
return 1; return 1;
if (!strcmp(argv[1], "swrk")) { if (!strcmp(argv[1], "swrk")) {
if (argc < 3)
goto usage;
/* /*
* This is to start criu service worker from libcriu calls. * This is to start criu service worker from libcriu calls.
* The usage is "criu swrk <fd>" and is not for CLI/scripts. * The usage is "criu swrk <fd>" and is not for CLI/scripts.
......
Markdown is supported
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