diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-10-17 22:37:22 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-10-17 22:37:22 +0200 |
commit | 7a02b4aba77a64b38992f1a20d8c851bdcc11500 (patch) | |
tree | 255cb8e504ca769ea0e8d8b26875692d99a46be8 /nx-X11 | |
parent | 2b0976e93809291eaff0725a5c0772e00a450e2b (diff) | |
parent | ae037701fe9a6337375d51abb2ea5b7aafdb434e (diff) | |
download | nx-libs-7a02b4aba77a64b38992f1a20d8c851bdcc11500.tar.gz nx-libs-7a02b4aba77a64b38992f1a20d8c851bdcc11500.tar.bz2 nx-libs-7a02b4aba77a64b38992f1a20d8c851bdcc11500.zip |
Merge branch 'uli42-pr/fix_stack_smashing' into 3.6.x
Attributes GH PR #942: https://github.com/ArcticaProject/nx-libs/pull/942
Diffstat (limited to 'nx-X11')
4 files changed, 22 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index ecc3f19be..7ca22ffad 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1188,7 +1188,7 @@ static void transferSelection(int resource) void nxagentCollectPropertyEvent(int resource) { - Atom atomReturnType; + XlibAtom atomReturnType; int resultFormat; unsigned long ulReturnItems; unsigned long ulReturnBytesLeft; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 346ee48d8..847d40918 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -3924,7 +3924,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X) } else { - Atom atomReturnType; + XlibAtom atomReturnType; int resultFormat; unsigned long ulReturnItems; unsigned long ulReturnBytesLeft; @@ -3940,8 +3940,8 @@ void nxagentHandleCollectPropertyEvent(XEvent *X) if (result == True) { - Window window = nxagentPropertyRequests[resource].window; - Atom property = nxagentPropertyRequests[resource].property; + XlibWindow window = nxagentPropertyRequests[resource].window; + XlibAtom property = nxagentPropertyRequests[resource].property; nxagentImportProperty(window, property, atomReturnType, resultFormat, ulReturnItems, ulReturnBytesLeft, pszReturnData); diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c index 230c9abae..3492ef473 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c @@ -23,6 +23,12 @@ /* */ /**************************************************************************/ +/* + * let the types be the Xlib types by undefining _XSERVER64. This + * means, when calling the functions of this file from nxagent (where + * Agent.h has been included) you need to use/provide XlibAtom and + * XlibWindow instead of Atom and Window + */ #undef _XSERVER64 #include <sys/socket.h> diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.h b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.h index c0259a939..885d262a6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.h +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.h @@ -827,19 +827,31 @@ extern int NXCollectProperty( Display* /* display */, unsigned int /* resource */, Window /* window */, +#ifdef XlibAtom + XlibAtom /* property */, +#else Atom /* property */, +#endif long /* long_offset */, long /* long_length */, Bool /* delete */, +#ifdef XlibAtom + XlibAtom /* req_type */ +#else Atom /* req_type */ #endif +#endif ); extern int NXGetCollectedProperty( #if NeedFunctionPrototypes Display* /* display */, unsigned int /* resource */, +#ifdef XlibAtom + XlibAtom* /* actual_type_return */, +#else Atom* /* actual_type_return */, +#endif int* /* actual_format_return */, unsigned long* /* nitems_return */, unsigned long* /* bytes_after_return */, |