aboutsummaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2017-10-12 17:06:18 +0200
committerPierre Ossman <ossman@cendio.se>2017-10-12 17:06:18 +0200
commitdfc2001b3f681cbd1377a3096781182727f13d24 (patch)
tree3a0b186b2dc7daa8fd90882870b7e0f227138430 /unix
parent19225507cca088ff965ccfc91bcf6f1fcd9960b3 (diff)
downloadtigervnc-dfc2001b3f681cbd1377a3096781182727f13d24.tar.gz
tigervnc-dfc2001b3f681cbd1377a3096781182727f13d24.zip
Don't validate timestamp on clipboard request
The normal Xorg server doesn't check this field, so neither can we as there are applications relying on this leniancy.
Diffstat (limited to 'unix')
-rw-r--r--unix/xserver/hw/vnc/vncSelection.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/unix/xserver/hw/vnc/vncSelection.c b/unix/xserver/hw/vnc/vncSelection.c
index 6a8fdc31..02a1cd1e 100644
--- a/unix/xserver/hw/vnc/vncSelection.c
+++ b/unix/xserver/hw/vnc/vncSelection.c
@@ -195,7 +195,7 @@ static int vncOwnSelection(Atom selection)
static int vncConvertSelection(ClientPtr client, Atom selection,
Atom target, Atom property,
- Window requestor, TimeStamp time)
+ Window requestor, CARD32 time)
{
Selection *pSel;
WindowPtr pWin;
@@ -212,8 +212,8 @@ static int vncConvertSelection(ClientPtr client, Atom selection,
if (rc != Success)
return rc;
- if (CompareTimeStamps(time, pSel->lastTimeChanged) != LATER)
- return BadMatch;
+ /* We do not validate the time argument because neither does
+ * dix/selection.c and some clients (e.g. Qt) relies on this */
rc = dixLookupWindow(&pWin, requestor, client, DixSetAttrAccess);
if (rc != Success)
@@ -291,7 +291,7 @@ static int vncConvertSelection(ClientPtr client, Atom selection,
}
event.u.u.type = SelectionNotify;
- event.u.selectionNotify.time = time.milliseconds;
+ event.u.selectionNotify.time = time;
event.u.selectionNotify.requestor = requestor;
event.u.selectionNotify.selection = selection;
event.u.selectionNotify.target = target;
@@ -324,11 +324,9 @@ static int vncProcConvertSelection(ClientPtr client)
rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess);
if (rc == Success && pSel->client == serverClient &&
pSel->window == wid) {
- TimeStamp time;
- time = ClientTimeToServerTime(stuff->time);
rc = vncConvertSelection(client, stuff->selection,
stuff->target, stuff->property,
- stuff->requestor, time);
+ stuff->requestor, stuff->time);
if (rc != Success) {
xEvent event;