aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-03-02 23:12:03 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commit124f5a5c6e4f37880c482d1037636ccfd7b6fca0 (patch)
tree244b54dd23b94035994fc123f7d63625137ce5c9 /nx-X11/programs
parent9293348c821f4939e38615853b47b8601d8e5d46 (diff)
downloadnx-libs-124f5a5c6e4f37880c482d1037636ccfd7b6fca0.tar.gz
nx-libs-124f5a5c6e4f37880c482d1037636ccfd7b6fca0.tar.bz2
nx-libs-124f5a5c6e4f37880c482d1037636ccfd7b6fca0.zip
Clipboard.c: sanity check for invalid resource
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 8844c88df..7fefd5ee1 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1592,6 +1592,14 @@ Bool nxagentCollectPropertyEventFromXServer(int resource)
int index = 0;
+ if (resource < 0)
+ {
+ #ifdef DEBUG
+ fprintf (stderr, "%s: resource [%d] is invalid.\n", __func__, resource);
+ #endif
+ return False;
+ }
+
/* determine the selection we are talking about here */
for (index = 0; index < nxagentMaxSelections; index++)
{