summaryrefslogtreecommitdiff
path: root/user/xf86-video-freedreno/secure-atom.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-02 03:48:39 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-02 03:48:39 +0000
commit2694701ad828f7857ba5cfdd9560a7976841d50d (patch)
treedb94bc8fcccfccaa86af3adecd9ab055215ff75f /user/xf86-video-freedreno/secure-atom.patch
parent7c5a1791a30d4a9621e28885559ee69ca6dbd79b (diff)
downloadpackages-2694701ad828f7857ba5cfdd9560a7976841d50d.tar.gz
packages-2694701ad828f7857ba5cfdd9560a7976841d50d.tar.bz2
packages-2694701ad828f7857ba5cfdd9560a7976841d50d.tar.xz
packages-2694701ad828f7857ba5cfdd9560a7976841d50d.zip
user/xf86-video-freedreno: new package
Diffstat (limited to 'user/xf86-video-freedreno/secure-atom.patch')
-rw-r--r--user/xf86-video-freedreno/secure-atom.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/user/xf86-video-freedreno/secure-atom.patch b/user/xf86-video-freedreno/secure-atom.patch
new file mode 100644
index 000000000..17101fb57
--- /dev/null
+++ b/user/xf86-video-freedreno/secure-atom.patch
@@ -0,0 +1,33 @@
+From ccba8f89995de7d5e1b216e580b789c4cda05035 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Tue, 13 Jun 2017 09:26:28 -0400
+Subject: modesetting: Validate the atom for enum properties
+
+The client could have said anything here, and if what they said doesn't
+actually name an atom NameForAtom() will return NULL, and strcmp() will
+be unhappy about that.
+
+[copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc]
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ src/drmmode_display.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/drmmode_display.c b/src/drmmode_display.c
+index c3a55e6..83f323d 100644
+--- a/src/drmmode_display.c
++++ b/src/drmmode_display.c
+@@ -898,7 +898,8 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
+ if (value->type != XA_ATOM || value->format != 32 || value->size != 1)
+ return FALSE;
+ memcpy(&atom, value->data, 4);
+- name = NameForAtom(atom);
++ if (!(name = NameForAtom(atom)))
++ return FALSE;
+
+ /* search for matching name string, then set its value down */
+ for (j = 0; j < p->mode_prop->count_enums; j++) {
+--
+cgit v1.1
+