XVnc identifies connection that is being currently queried with queryConnectId 
variable. That is void* actually containing pointer to TcpSocket allocated in 

The lower 32 bits are given to client in ProcVncExtGetQueryConnect:
  rep.opaqueId = (CARD32)(long)queryConnectId;

But in ProcVncExtApproveConnect the 32 bit number is converted to void* and 
compared as pointer:
  if (queryConnectId == (void*)stuff->opaqueId) {

In case of 64 bit system and when TcpSocket gets allocated on higher than 
0xffffffff address, the condition will fail and XVnc will ignore the 
connection approval.
Index: unix/xserver/hw/vnc/vncExtInit.cc
--- xserver/hw/vnc/vncExtInit.cc        (revision 5122)
+++ xserver/hw/vnc/vncExtInit.cc        (working copy)
@@ -1068,7 +1068,7 @@
-  if (queryConnectId == (void*)stuff->opaqueId) {
+  if ((CARD32)(long)queryConnectId == stuff->opaqueId) {
     for (int scr = 0; scr < screenInfo.numScreens; scr++) {
       if (desktop[scr]) {
         desktop[scr]->approveConnection(queryConnectId, stuff->approve,

Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
Tigervnc-devel mailing list

Reply via email to