diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2019-07-15 11:34:35 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2019-07-15 11:34:35 +0200 |
commit | 77e9050b05ad1590bfe5123028e6ca219332fb84 (patch) | |
tree | 222de7eb446da5a1cf3f3427c49f56c44f3c899b | |
parent | 64648035285ea960e410b25cd7b7d238a567c589 (diff) | |
parent | 9a8b937bcfd84575e13039f316cbcb14c9729df4 (diff) |
Merge remote-tracking branch 'origin/master' into obsd
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | xinit.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 92fa096..3132dc2 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ dnl Process this file with autoconf to create configure. # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([xinit], [1.4.0], +AC_INIT([xinit], [1.4.1], [https://gitlab.freedesktop.org/xorg/app/xinit/issues], [xinit]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) @@ -151,7 +151,6 @@ main(int argc, char *argv[]) register char **ptr; pid_t pid; int client_given = 0, server_given = 0; - int client_args_given = 0, server_args_given = 0; int start_of_client_args, start_of_server_args; struct sigaction sa, si; #ifdef __APPLE__ @@ -174,7 +173,8 @@ main(int argc, char *argv[]) } start_of_client_args = (cptr - client); while (argc && strcmp(*argv, "--")) { - client_args_given++; + if (cptr > clientargv + sizeof(clientargv) / sizeof(*clientargv) - 2) + Fatalx("too many client arguments"); *cptr++ = *argv++; argc--; } @@ -202,7 +202,8 @@ main(int argc, char *argv[]) start_of_server_args = (sptr - server); while (--argc >= 0) { - server_args_given++; + if (sptr > serverargv + sizeof(serverargv) / sizeof(*serverargv) - 2) + Fatalx("too many server arguments"); *sptr++ = *argv++; } *sptr = NULL; |