diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-11-25 12:48:21 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-11-25 12:48:21 +0000 |
commit | cbce4cf96dfa2eeecb253d73d7d9acecbc52ad67 (patch) | |
tree | 0922be892dfc8ed65e726250f0a7e20496b2c847 /os | |
parent | 2b75c19ea2bb76512d51e99c5c9ecb073fdb9163 (diff) |
Bugzilla #1914: fix size limit for -fp argument
Diffstat (limited to 'os')
-rw-r--r-- | os/utils.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/os/utils.c b/os/utils.c index 69729c61d..8c69cb355 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.9 2004/09/29 04:17:44 gisburn Exp $ */ +/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.10 2004/11/15 15:06:50 ago Exp $ */ /* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */ /* @@ -2048,9 +2048,17 @@ CheckUserParameters(int argc, char **argv, char **envp) { /* Check each argv[] */ for (i = 1; i < argc; i++) { - if (strlen(argv[i]) > MAX_ARG_LENGTH) { - bad = ArgTooLong; - break; + if (strcmp(argv[i], "-fp") == 0) + { + i++; /* continue with next argument. skip the length check */ + if (i >= argc) + break; + } else + { + if (strlen(argv[i]) > MAX_ARG_LENGTH) { + bad = ArgTooLong; + break; + } } a = argv[i]; while (*a) { |