-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server: Disallow negative argument values ...
... with -deferupdate, -maxclipboard, -rfbport, and -rfbwait.
- Loading branch information
1 parent
fe7e6c2
commit e9cdac1
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Modified for XFree86 4.x by Alan Hourihane <[email protected]> | ||
*/ | ||
|
||
/* Copyright (C) 2009-2023 D. R. Commander. All Rights Reserved. | ||
/* Copyright (C) 2009-2024 D. R. Commander. All Rights Reserved. | ||
* Copyright (C) 2021 Steffen Kieß | ||
* Copyright (C) 2016-2017 Pierre Ossman for Cendio AB. All Rights Reserved. | ||
* Copyright (C) 2010 University Corporation for Atmospheric Research. | ||
|
@@ -229,6 +229,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) | |
if (strcasecmp(argv[i], "-deferupdate") == 0) { /* -deferupdate ms */ | ||
REQUIRE_ARG(); | ||
rfbDeferUpdateTime = atoi(argv[i + 1]); | ||
if (rfbDeferUpdateTime < 0) { | ||
UseMsg(); | ||
exit(1); | ||
} | ||
return 2; | ||
} | ||
|
||
|
@@ -317,6 +321,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) | |
if (strcasecmp(argv[i], "-maxclipboard") == 0) { | ||
REQUIRE_ARG(); | ||
rfbMaxClipboard = atoi(argv[i + 1]); | ||
if (rfbMaxClipboard < 0) { | ||
UseMsg(); | ||
exit(1); | ||
} | ||
return 2; | ||
} | ||
|
||
|
@@ -364,6 +372,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) | |
if (strcasecmp(argv[i], "-rfbport") == 0) { /* -rfbport port */ | ||
REQUIRE_ARG(); | ||
rfbPort = atoi(argv[i + 1]); | ||
if (rfbPort < 0) { | ||
UseMsg(); | ||
exit(1); | ||
} | ||
return 2; | ||
} | ||
|
||
|
@@ -386,6 +398,10 @@ int ddxProcessArgument(int argc, char *argv[], int i) | |
if (strcasecmp(argv[i], "-rfbwait") == 0) { /* -rfbwait ms */ | ||
REQUIRE_ARG(); | ||
rfbMaxClientWait = atoi(argv[i + 1]); | ||
if (rfbMaxClientWait < 0) { | ||
UseMsg(); | ||
exit(1); | ||
} | ||
return 2; | ||
} | ||
|
||
|