| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes ArcticaProject/nx-libs#271.
|
|
|
|
|
|
|
|
|
|
|
|
| |
XlibInt.c: In function ‘_XIOError’:
XlibInt.c:3750:1: warning: ‘noreturn’ function does return [enabled by default]
}
After fixing the above a new warning came up, which is also fixed now:
XlibInt.c: In function ‘_XIOError’:
XlibInt.c:3750:1: warning: control reaches end of non-void function [-Wreturn-type]
}
|
|
|
|
|
|
|
|
|
| |
The only use of XCONN_CHECK_FREQ was removed in commit 15e5eaf62897b3179
when we dropped the old Xlib connection handling in favor of xcb's.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit looks a bit crazy at first glance. It (re-)introduces lots
of whitespaces and bad formatting.
Explanation: Backporting upstream changes lead to commits being
applied out of order. This meant a lot of manual intervention which in
turn lead to slight differences between upstream and NX.
With this commit these slight differences are minimized which will be
of great help when adding further upstream patches.
|
|
|
|
|
|
|
| |
Better to silence the compiler warning than break ABI.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Inspired by a pattern in NoMachine's NX. Consistently zeroed buffers
compress better with ssh and friends. Note that you'll need to rebuild
all your protocol libraries to take advantage of this.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Casts were annoying gcc by dropping constness when changing types,
when routines simply either copy data into the request buffer or
send it directly to the X server, and never modify the input.
Fixes gcc warnings including:
ChProp.c: In function 'XChangeProperty':
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetHints.c: In function 'XSetStandardProperties':
SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c: In function 'XSetPointerMapping':
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StBytes.c: In function 'XStoreBuffer':
StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XStoreName':
StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XSetIconName':
StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
| |
This will prevent a number of false positives in where clang's
static analysis reports about calls to malloc(0).
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides a simplified version of the SetReqLen macro when using clang for
static analysis. Prior to this change, we would see many Idempotent operation
warnings inside this macro due to the common case of calling with arg2 and
arg3 being the same variable. This has no effect on code produced during
compilation, but it silences a number of false positives in static analysis.
XIPassiveGrab.c:170:5: warning: Assigned value is always the same as the existing value
SetReqLen(req, num_modifiers, num_modifiers);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from XIPassiveGrab.c:26:
.../nx-X11/lib/X11/Xlibint.h:580:8: note: instantiated from:
n = badlen; \
^
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
| |
Some XI2 requests change in size over different versions and libXi would
need to hack around GetReq and GetReqExtra. Add a new GetReqSized so the
library can explicitly specify the size of the request in 4-byte units.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
| |
GetEmptyReq and GetResReq cannot do this due to the final typecast -
typically requests that need either of those do not have their own typedef
in the protocol headers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CVE-2013-7439).
MakeBigReq inserts a length field after the first 4 bytes of the request
(after req->length), pushing everything else back by 4 bytes.
The current memmove moves everything but the first 4 bytes back. If a
request aligns to the end of the buffer pointer when MakeBigReq is
invoked for that request, this runs over the buffer. Instead, we need to
memmove minus the first 4 bytes (which aren't moved), minus the last 4
bytes (so we still align to the previous tail).
The 4 bytes that fell out are already handled with Data32, which will
handle the buffermax correctly.
The case where req->length = 1 was already not functional.
Reported by Abhishek Arya <inferno@chromium.org> (against X.Org BTS).
https://bugzilla.mozilla.org/show_bug.cgi?id=803762
Reviewed-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Rebased-for-NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Re-applied after upgrade to libX11 1.3.4: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
| |
Try to offset the cost of all the recent checks we've added by giving
the compiler a hint that the branches that involve us eating data
are less likely to be used than the ones that process it.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
| |
This basically repeats commit bad67799229b94ea2ba0174319949766ad1c2fc6
after the upgrade to libX11 1.3.4.
|
|
|
|
| |
Upstream has changed the header guards. We adapt them to prevent double inclusion.
|
| |
|
|
|
|
| |
that NoMachine placed there own copyright statement in.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove defines of NEED_EVENTS and NEED_REPLIES because they are never
used anywhere.
Basically these three commits, but as they are newer and to not match
the code structure the patches have not been applied but replaced by
sed + manual intervention:
From cb95642dc8edebb2935dd471f8b339cb98aa8481 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@redhat.com>
Date: Fri, 28 Nov 2008 22:28:32 +1000
Subject: Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.
Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.
Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
--
From 6de368c9aa7ccd2fcd62fca5a2b278913db4d03d Mon Sep 17 00:00:00 2001
From: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu, 1 Jul 2010 06:50:47 -0300
Subject: Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
--
From 57c03e52e6b4e3ed54df5fdd778865467d08e119 Mon Sep 17 00:00:00 2001
From: Fernando Carrijo <fcarrijo@yahoo.com.br>
Date: Thu, 1 Jul 2010 06:59:48 -0300
Subject: Purge macro NEED_EVENTS
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required for successful linking of libXrender against libNX_X11.
Port from libXfixes commit b031e3b60fa1af9e49449f23d4a84395868be3ab We
need this here to enable linking of current libXrender against
libNX_X11 instead of the system's libX11
The original implementation of this function (libX11 commit
9f5d83706543696fc944c1835a403938c06f2cc5) uses xcb stuff which we do
not have in libNX_X11. So we take a workaround from another lib. This
workaround had been added temporarily to a couple of X extension libs,
see
e.g. https://lists.x.org/archives/xorg-devel/2013-July/036763.html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To enable linking of a current libXrender libNX_X11 needs that symbol.
This is a (manual) backport of the following upstream libX11 commit
available at
https://cgit.freedesktop.org/xorg/lib/libX11/commit/src/XlibInt.c?id=4a060f993bf676cf21ad9784e010f54134da7b40:
Commit: 4a060f993bf676cf21ad9784e010f54134da7b40
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 17 Oct 2011 09:45:15 +1000
Subject: Add _XGetRequest as substitute for GetReq/GetReqExtra
|
|
|
|
| |
with system-wide shared libraries.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the process of building nxagent against more and more system-wide installed
X.org libraries, we come to the limit of including structs from this (bundled
nx-X11) and that (system-wide X.Org) library.
This commit introduces a clear namespace separation of headers provided by
nx-X11 and headers provided by X.Org. This approach is only temporary as we
want to drop all nx-X11 bundled libraries from nx-libs.
However, for a while we need to make this separation clear and also ship
some reduced fake X.Org headers that avoid pulling in libX* and libNX_X*
symbols at the same time.
This patch has been tested on Debian jessie and unstable and requires no
overall testing on various distros and distro versions, as we finally will
drop all libNX_X* libraries and build against X.org's client libs.
For now, this hack eases our development / cleanup process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CVE-2013-7439).
MakeBigReq inserts a length field after the first 4 bytes of the request
(after req->length), pushing everything else back by 4 bytes.
The current memmove moves everything but the first 4 bytes back. If a
request aligns to the end of the buffer pointer when MakeBigReq is
invoked for that request, this runs over the buffer. Instead, we need to
memmove minus the first 4 bytes (which aren't moved), minus the last 4
bytes (so we still align to the previous tail).
The 4 bytes that fell out are already handled with Data32, which will
handle the buffermax correctly.
The case where req->length = 1 was already not functional.
Reported by Abhishek Arya <inferno@chromium.org> (against X.Org BTS).
https://bugzilla.mozilla.org/show_bug.cgi?id=803762
Reviewed-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Rebased-for-NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
|
|
|
| |
WORD64, WORD64ALIGN, MUSTCOPY, UNSIGNEDBITFIELDS definitions).
|
|
|
|
|
|
|
|
| |
Summary: Imported nx-X11-3.5.0-1.tar.gz
Keywords:
Imported nx-X11-3.5.0-1.tar.gz
into Git repository
|
|
|
|
|
|
|
|
| |
Summary: Imported nx-X11-3.4.0-3.tar.gz
Keywords:
Imported nx-X11-3.4.0-3.tar.gz
into Git repository
|
|
|
|
|
|
|
|
| |
Summary: Imported nx-X11-3.4.0-1.tar.gz
Keywords:
Imported nx-X11-3.4.0-1.tar.gz
into Git repository
|
|
Summary: Imported nx-X11-3.1.0-1.tar.gz
Keywords:
Imported nx-X11-3.1.0-1.tar.gz
into Git repository
|