summaryrefslogtreecommitdiffstats
path: root/source/x
diff options
context:
space:
mode:
Diffstat (limited to 'source/x')
-rw-r--r--source/x/x11/build/libX112
-rw-r--r--source/x/x11/patch/libX11.patch1
-rw-r--r--source/x/x11/patch/libX11/libX11.fix_size.diff20
3 files changed, 22 insertions, 1 deletions
diff --git a/source/x/x11/build/libX11 b/source/x/x11/build/libX11
index d00491fd7..0cfbf0888 100644
--- a/source/x/x11/build/libX11
+++ b/source/x/x11/build/libX11
@@ -1 +1 @@
-1
+2
diff --git a/source/x/x11/patch/libX11.patch b/source/x/x11/patch/libX11.patch
new file mode 100644
index 000000000..c69e0e2da
--- /dev/null
+++ b/source/x/x11/patch/libX11.patch
@@ -0,0 +1 @@
+zcat $CWD/patch/libX11/libX11.fix_size.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/source/x/x11/patch/libX11/libX11.fix_size.diff b/source/x/x11/patch/libX11/libX11.fix_size.diff
new file mode 100644
index 000000000..ab2a0cf77
--- /dev/null
+++ b/source/x/x11/patch/libX11/libX11.fix_size.diff
@@ -0,0 +1,20 @@
+--- ./modules/im/ximcp/imRmAttr.c.orig 2020-07-31 08:46:40.000000000 -0500
++++ ./modules/im/ximcp/imRmAttr.c 2020-08-02 13:07:15.343940851 -0500
+@@ -265,7 +265,7 @@
+
+ if (num > (USHRT_MAX / sizeof(XIMStyle)))
+ return False;
+- if ((sizeof(num) + (num * sizeof(XIMStyle))) > data_len)
++ if ((2 * sizeof(CARD16) + (num * sizeof(CARD32))) > data_len)
+ return False;
+ alloc_len = sizeof(XIMStyles) + sizeof(XIMStyle) * num;
+ if (alloc_len < sizeof(XIMStyles))
+@@ -379,7 +379,7 @@
+
+ if (num > (UINT_MAX / sizeof(XIMHotKeyTrigger)))
+ return False;
+- if ((sizeof(num) + (num * sizeof(XIMHotKeyTrigger))) > data_len)
++ if ((2 * sizeof(CARD16) + (num * 3 * sizeof(CARD32))) > data_len)
+ return False;
+ alloc_len = sizeof(XIMHotKeyTriggers)
+ + sizeof(XIMHotKeyTrigger) * num;