summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-25 12:56:28 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-25 12:56:28 +0000
commita6d5f9f53c884d395ec9172e3017f937dc9cc313 (patch)
tree51d6ac692ad7ff6969f2de3a1731a8e1fbe034c6
parentd1eac007e4213f4e92efc55ca1af032aad9d0bae (diff)
Bugzilla #1914: fix size limit for -fp argument
-rw-r--r--os/utils.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/os/utils.c b/os/utils.c
index 522530a7b..cba40517e 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.6 2004/08/11 22:27:50 kem Exp $ */
+/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.1.4.3.2.4 2004/09/15 16:34:15 ago Exp $ */
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
/*
@@ -1934,9 +1934,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) {