aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-15 12:55:17 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-15 12:55:17 +0100
commit1dad092caf01d733990648e6df64cbf964df5143 (patch)
tree39de0e643e76754a3e23ca9dd0350b8ba4f76250 /debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch
parent6d70b9e3c47f27a166f4aacb522c5c1e49092dd9 (diff)
parent2b9025f797ee322e21077e100c2ee27c2e7fa0e0 (diff)
downloadnx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.gz
nx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.bz2
nx-libs-1dad092caf01d733990648e6df64cbf964df5143.zip
Merge branch '3.6.x'
Diffstat (limited to 'debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch')
-rw-r--r--debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch70
1 files changed, 0 insertions, 70 deletions
diff --git a/debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch b/debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch
deleted file mode 100644
index cc5c07807..000000000
--- a/debian/patches/0057_nx-X11_sanitize-eventmasks.full.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Description: Create Windows and fix drawing issues on Big Endian 64bit systems
-Author: Mihai Moldovan <ionic@ionic.de>
-Abstract:
- Multiple endiannes issues were setting incorrect event masks when creating and
- drawing X11 windows.
- .
- This time, a smaller integer has been casted to a bigger one and passed to some
- function actually setting its value.
- .
- This meant, that garbage from stack was attached to the smaller integer value,
- putting unknown memory into the lower bytes of the bigger integer.
- .
- Fix this by creating a big, initialized temporary variable, let the function do
- its magic on that one and pass the value back to the smaller variable--and
- cross your fingers the smaller variable can hold it without overrunning. (The
- last bit is a design issue we can't really fix and has been around even before
- this patch.)
-
---- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
-@@ -327,7 +327,10 @@ FIXME: We need to set save under on the
-
- if (mask & CWEventMask)
- {
-- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask);
-+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */
-+ Mask tmp_mask = attributes.event_mask;
-+ nxagentGetEventMask(pWin, &tmp_mask);
-+ attributes.event_mask = (int)tmp_mask;
- }
- #ifdef WARNING
- else
-@@ -2891,7 +2894,10 @@ FIXME: Do we need to set save unders att
-
- if (mask & CWEventMask)
- {
-- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask);
-+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */
-+ Mask tmp_mask = attributes.event_mask;
-+ nxagentGetEventMask(pWin, &tmp_mask);
-+ attributes.event_mask = (int)tmp_mask;
- }
- #ifdef WARNING
- else
-@@ -3352,7 +3358,10 @@ void nxagentSetTopLevelEventMask(pWin)
-
- if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
- {
-- nxagentGetEventMask(pWin, (Mask*)&attributes.event_mask);
-+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */
-+ Mask tmp_mask = attributes.event_mask;
-+ nxagentGetEventMask(pWin, &tmp_mask);
-+ attributes.event_mask = (int)tmp_mask;
-
- XChangeWindowAttributes(nxagentDisplay, nxagentWindow(pWin), mask, &attributes);
- }
---- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
-+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
-@@ -1665,7 +1665,10 @@ N/A
-
- attributes.background_pixel = nxagentBlackPixel;
-
-- nxagentGetDefaultEventMask((Mask*)&attributes.event_mask);
-+ /* Assume that the mask fits in int... broken on Big Endian 64bit systems. */
-+ Mask tmp_mask = attributes.event_mask;
-+ nxagentGetDefaultEventMask(&tmp_mask);
-+ attributes.event_mask = (int)tmp_mask;
-
- attributes.colormap = nxagentDefaultVisualColormap(nxagentDefaultVisual(pScreen));
-