aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
Commit message (Collapse)AuthorAgeFilesLines
* Font.c: replace malloc + strcpy by strdup + fix memleakUlrich Sibiller2018-01-071-2/+3
|
* Font.c: free possibly allocated memUlrich Sibiller2018-01-071-0/+5
| | | | even if we issue a FatalError afterwards
* Font.c: replace memcpy by sprintf preventing possible buffer overflowsUlrich Sibiller2018-01-071-9/+3
| | | | | | I am not sure about the maximum font name length in X but just in case use snprintf instead of memcpy to be sure nothing dangerous can happen here.
* Args.c: simplify nxagentGetDialogName()Ulrich Sibiller2018-01-071-11/+4
|
* Args.c, Error.[ch]: introduce own length macro for nxagentClientsLogNameUlrich Sibiller2018-01-073-5/+6
|
* Args.c: use strdup instead of mallocUlrich Sibiller2018-01-071-35/+7
|
* Error.c: update nxagentPrintErrorUlrich Sibiller2018-01-071-6/+8
| | | | | | | This is a partial copy from XlibInt.c's _XPrintDefaultError, which had some minor changes since being copied. Update to reflect these changes. Also comment some more lines as their result was unused an cluttered the output.
* Error.c: replace strcpy/strcat by snprintfUlrich Sibiller2018-01-072-21/+13
|
* Error.c: use standard file descriptor macrosUlrich Sibiller2018-01-071-3/+3
|
* Error.c: remove trailing whitespaceUlrich Sibiller2018-01-071-5/+5
| | | | and insert one single space
* Error.c: remove empty ifdefUlrich Sibiller2018-01-071-4/+0
|
* Font.c: pass down sizeUlrich Sibiller2018-01-071-6/+5
|
* Display.c: pass down buffer size to nxagentLookForIconFileUlrich Sibiller2018-01-071-24/+22
| | | | Also comment the code and convert error messages to warnings.
* Replace hardcoded string lengths by macrosUlrich Sibiller2018-01-076-69/+43
|
* Font.c: make nxagentGetFontServerPath more readableUlrich Sibiller2018-01-071-4/+5
|
* Screen.c: string handling improvementsUlrich Sibiller2018-01-071-16/+10
|
* Font.c: shorten string handlingUlrich Sibiller2018-01-071-18/+7
|
* Keyboard.c: replace malloc + strcpy by asprintfUlrich Sibiller2018-01-071-6/+4
|
* Keyboard.c: improve user messages for keyboard file handlingUlrich Sibiller2018-01-071-1/+1
|
* Keyboard.c: fix memory leakUlrich Sibiller2018-01-071-1/+3
|
* Dialog.c: fix possible buffer overflowsUlrich Sibiller2018-01-071-0/+13
| | | | Fix write past the end of singlePath if PATH contains dirs longer than PATH_MAX.
* Dialog.c,Display.c,NXdixfonts.c: replace strncpy() by snprintf where appropriateUlrich Sibiller2018-01-075-17/+11
|
* Dialog.c,Display.c,Font.c,NXdixfonts.c: don't use hardcoded string buffer ↵Ulrich Sibiller2018-01-074-20/+18
| | | | lengths
* nx-X11: reintroduce creation of libX11 compat symlinks.Mihai Moldovan2017-12-301-0/+2
| | | | | We need this to be able to execute the resulting nxagent binary from within the build directory.
* nx-X11: build programs with a temporary RPATH/RUNPATH value and a relinked ↵Mihai Moldovan2017-12-301-2/+2
| | | | | | | | | version with the system location. While the install target explicitly installs the relinked system-location version of a program, we do not actually use this. Currently, we copy nxagent directly out of the build root.
* nxagent: implement RPATH/RUNPATH override for libX11.Mihai Moldovan2017-12-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in ArcticaProject/nx-libs#610, we need a way to load libNX_X11 as a fake version of libX11 into nxagent's address space. For doing so, we have to link against libX11 at build-time and specify a(n) RPATH/RUNPATH to our libX11 -> libNX_X11 compat symlinks. This commit is essentially doing a cross between options 3 and 4 discussed in the provided GH issue. We link libX11 early (before specifying -Lcompat_symlinks_dir), so that the linker finds the "real" libX11 version with the libX11 SONAME. This leads to our binary depending upon both libX11 and libNX_X11 SONAMEs. We already always added RPATH/RUNPATH, but these values are not passed down to dependent libraries. What happens at run-time is that the loader searches for a libX11 SONAME, takes RPATH/RUNPATH into account and loads our libNX_X11 library instead via the compat symlinks. This satisfies the libX11 SONAME and dependent libraries will *not* load the system libX11 version again. Debian's dpkg-shlibdeps isn't quite happy about this mismatching SONAME situation, so instruct to look the other way while we're minding our business. Fixes: ArcticaProject/nx-libs#610
* reduce usage of uninitialised bytesUlrich Sibiller2017-12-2812-104/+86
| | | | as reported by valgrind
* nx-X11/programs/Xserver/hw/nxagent/Screen.c: re-enable normal error/warning ↵Mihai Moldovan2017-12-241-2/+2
| | | | | | output. Was dropped erroneously in cec31e2f06b29b332ee78cfefeefa7bfa136be75.
* nx-X11/programs/Xserver/hw/nxagent/Screen.c: update screen size after ↵Mihai Moldovan2017-12-241-0/+7
| | | | | | | modifying CRTC modes. This should get rid of the infamous "800x600 screen size" issue reproduced in X2Go whole display setups.
* Drop SHMNAME workaround again, it *is* defined in shmstr.h, which is ↵Mihai Moldovan2017-12-163-8/+2
| | | | actually header I was searching for.
* nx-X11/programs/Xserver/Xext/shape.c: avoid pulling in Xlib in legacy mode ↵Mihai Moldovan2017-12-161-0/+7
| | | | via the _SHAPE_SERVER_ macro.
* nx-X11/programs/Xserver/Xext/shape.c: pull in shapestr.h for legacy Xext ↵Mihai Moldovan2017-12-161-1/+1
| | | | proto versions, since shape.h would pull in Xlib.
* Handle SHAPE proto splitup gracefully for legacy Xext proto versions.Mihai Moldovan2017-12-161-0/+4
|
* zlib compatibility: whenever we want -I flags only, assume that the headers ↵Mihai Moldovan2017-12-162-3/+3
| | | | | | are directly available. Especially don't add linking flags willy-nilly.
* nx-X11/programs/Xserver/include/misc.h: add compat define for SHMNAME.Mihai Moldovan2017-12-161-0/+6
|
* Support building with legacy zlib versions that do not ship a pkg-config file.Mihai Moldovan2017-12-163-4/+4
|
* Support building with legacy (pre-7.1.0) Xext proto versions.Mihai Moldovan2017-12-162-0/+8
| | | | | Legacy Xext proto versions are automatically detected by the main Makefile.
* Support building with legacy (pre-1.4.2) libXfont(1) versions.Mihai Moldovan2017-12-162-0/+10
| | | | | | | | Partly reverts ec30a857eb0d67b232f8d43e63a6370023f4c4d0, but in a forward-compatible manner. Legacy libXfont1 versions are automatically detected by the main Makefile.
* release 3.5.99.123.5.99.12Mike Gabriel2017-12-151-1/+1
|
* Xserver/hw/nxagent/Image.c: Fix regression FTBFS after d4465b71 got merged in.Mike Gabriel2017-12-151-4/+4
|
* release 3.5.99.113.5.99.11Mike Gabriel2017-12-151-1/+1
|
* Xserver/hw/nxagent/Clipboard.c: Fix free calls (free back to XFree).Mike Gabriel2017-12-151-3/+3
| | | | | | | | | | | They have been flawed ever since nxagent came up, as they were Xfree (non-capital f) always, but should have been XFree (capital F, defined in Xlibint.h and part of libNX_X11). . Probably this all should be free() all over the code (bearing in mind, that XFree() returns int, not void. But still... Fixes ArcticaProject/nx-libs#553.
* Xserver/hw/nxagent/compext: Xfree -> free and Xmalloc -> malloc.Mike Gabriel2017-12-154-121/+114
|
* Xserver/GL/glx/glxcmds.c: Cast small-int values through intptr_t when passed ↵Mike Gabriel2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | as pointers Picked from this X.org commit: commit b0dd6be2c8703f7062d45ac9fd646550c7d54e3b Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:38:44 2009 +1100 Cast small-int values through intptr_t when passed as pointers On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe. Casting through the pointer-sized integer type intptr_t convinces the compiler that this is OK. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (Only appropriate location for backporting: Xserver/GL/glx/glxcmds.c).
* glx: warning fixesMike Gabriel2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | commit 63ccaec2c39f4b5742383472c951ee2cd35c9e14 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:23 2010 -0400 render2.c: In function ‘__glXDisp_Map2d’: render2.c:127: warning: ‘u1’ may be used uninitialized in this function render2.c: In function ‘__glXDisp_Map1d’: render2.c:90: warning: ‘u1’ may be used uninitialized in this function Remove unnecessary test, and change memcpy to memmove as all users were doing overlapping copies. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Xserver/GL/glx/glxfb.c: Fix compiler warning: pointer-sign.Mike Gabriel2017-12-141-1/+1
| | | | | | | | glxfb.c: In function '__glXFBMemSwapBuffers': glxfb.c:117:5: warning: pointer targets in passing argument 10 of 'pGC->ops->PutImage' differ in signedness [-Wpointer-sign] buf); ^~~ glxfb.c:117:5: note: expected 'char *' but argument is of type 'GLubyte * {aka unsigned char *}'
* hw/nxagent/Events.c: Fix compiler warnings (with NX_DEBUG_INPUT): format.Mike Gabriel2017-12-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Events.c: In function 'nxagentDumpInputDevicesState': Events.c:4662:58: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'DeviceIntPtr {aka struct _DeviceIntRec *}' [-Wformat=] fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4662:82: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'CARD32 {aka unsigned int}' [-Wformat=] fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4662:19: warning: format '%p' expects argument of type 'void *', but argument 7 has type 'GrabPtr {aka struct _GrabRec *}' [-Wformat=] fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4675:66: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'WindowPtr {aka struct _Window *}' [-Wformat=] fprintf(stderr, "\nKeyboard grab state: \n\twindow pointer [%p]" ^ Events.c:4689:59: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'DeviceIntPtr {aka struct _DeviceIntRec *}' [-Wformat=] fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" ^ Events.c:4689:23: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'Mask {aka unsigned int}' [-Wformat=] fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" ^ Events.c:4722:57: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'DeviceIntPtr {aka struct _DeviceIntRec *}' [-Wformat=] fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4722:81: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'CARD32 {aka unsigned int}' [-Wformat=] fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4722:19: warning: format '%p' expects argument of type 'void *', but argument 7 has type 'GrabPtr {aka struct _GrabRec *}' [-Wformat=] fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%lu]" ^ Events.c:4735:65: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'WindowPtr {aka struct _Window *}' [-Wformat=] fprintf(stderr, "\nPointer grab state: \n\twindow pointer [%p]" ^ Events.c:4750:61: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'DeviceIntPtr {aka struct _DeviceIntRec *}' [-Wformat=] fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" ^ Events.c:4750:25: warning: format '%lx' expects argument of type 'long unsigned int', but argument 10 has type 'Mask {aka unsigned int}' [-Wformat=] fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" ^
* hw/nxagent/NXxvdisp.c: Fix compiler warnings: misleading-indentationMike Gabriel2017-12-141-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NXxvdisp.c: In function 'ProcXvDispatch': NXxvdisp.c:96:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:99:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~ NXxvdisp.c:104:9: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:107:10: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~ NXxvdisp.c:118:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:121:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~ NXxvdisp.c:126:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:129:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~ NXxvdisp.c:137:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:140:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~ NXxvdisp.c:146:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ NXxvdisp.c:149:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' break; ^~~~~
* hw/nxagent/NXdispatch.c: Fix compiler warning: misleading-indentationMike Gabriel2017-12-141-1/+1
| | | | | | | | | | NXdispatch.c: In function 'Dispatch': NXdispatch.c:309:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!(dispatchException & DE_TERMINATE)) ^~ NXdispatch.c:312:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' while (!dispatchException) ^~~~~
* Xserver/Xi/chgfctl.c: Fix compiler warning: misleading-indentation.Mike Gabriel2017-12-141-3/+3
| | | | | | | | | | chgfctl.c: In function 'ChangeKbdFeedback': chgfctl.c:359:6: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ chgfctl.c:361:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else' kctrl.autoRepeats[inx] = ^~~~~