Ver código fonte

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.
tags/v1.8.90
Pierre Ossman 6 anos atrás
pai
commit
dfc2001b3f
1 arquivos alterados com 5 adições e 7 exclusões
  1. 5
    7
      unix/xserver/hw/vnc/vncSelection.c

+ 5
- 7
unix/xserver/hw/vnc/vncSelection.c Ver arquivo

@@ -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;


Carregando…
Cancelar
Salvar