1 --- a/src/rsh-client.c.orig 2005-10-02 17:17:21.000000000 +0200
2 +++ b/src/rsh-client.c 2017-11-07 16:56:06.957370469 +0100
4 char *cvs_server = (root->cvs_server != NULL
5 ? root->cvs_server : getenv ("CVS_SERVER"));
7 - /* This needs to fit "rsh", "-b", "-l", "USER", "host",
8 + /* This needs to fit "rsh", "-b", "-l", "USER", "--", "host",
9 "cmd (w/ args)", and NULL. We leave some room to grow. */
13 rsh_argv[i++] = root->username;
16 + /* Only non-option arguments from here. (CVE-2017-12836) */
17 + rsh_argv[i++] = "--";
19 rsh_argv[i++] = root->hostname;
20 rsh_argv[i++] = cvs_server;
21 rsh_argv[i++] = "server";
23 *p++ = root->username;
27 *p++ = root->hostname;