summaryrefslogtreecommitdiff
path: root/recipes/xorg-xserver
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2010-06-29 14:22:55 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2010-06-29 17:18:13 +0200
commit39084da9b9c62d46fa93df9dbd722a49b39663a3 (patch)
treed0531b3beab2c1fa8529cbb8d70dd0e37a09fa44 /recipes/xorg-xserver
parent9528e0ecc10fa27ab71592906766a2acf3180319 (diff)
xserver-xorg-1.8.99.903: add patch for segmentation fault while adding modes without name
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/xorg-xserver')
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.8.99.903/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch35
-rw-r--r--recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb3
2 files changed, 37 insertions, 1 deletions
diff --git a/recipes/xorg-xserver/xserver-xorg-1.8.99.903/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch b/recipes/xorg-xserver/xserver-xorg-1.8.99.903/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch
new file mode 100644
index 0000000000..b87d9768ea
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg-1.8.99.903/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch
@@ -0,0 +1,35 @@
+From 2ba68d05755b4dc8ec8b70733cfece032e01ce89 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Tue, 29 Jun 2010 13:26:59 +0200
+Subject: [PATCH] xf86Modes: make sure that DisplayModeRec name is initialized to NULL and then don't call free() on it in xf86SetModeDefaultName
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ hw/xfree86/modes/xf86Modes.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
+index 05f4319..ccd2cc6 100644
+--- a/hw/xfree86/modes/xf86Modes.c
++++ b/hw/xfree86/modes/xf86Modes.c
+@@ -138,7 +138,8 @@ xf86SetModeDefaultName(DisplayModePtr mode)
+ {
+ Bool interlaced = !!(mode->Flags & V_INTERLACE);
+
+- free(mode->name);
++ if (mode->name)
++ free(mode->name);
+
+ mode->name = XNFprintf("%dx%d%s", mode->HDisplay, mode->VDisplay,
+ interlaced ? "i" : "");
+@@ -210,6 +211,7 @@ xf86DuplicateMode(const DisplayModeRec *pMode)
+ *pNew = *pMode;
+ pNew->next = NULL;
+ pNew->prev = NULL;
++ pNew->name = NULL;
+
+ if (pMode->name == NULL)
+ xf86SetModeDefaultName(pNew);
+--
+1.7.1
+
diff --git a/recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb b/recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb
index b8b27ad91a..142ea61d2e 100644
--- a/recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb
+++ b/recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb
@@ -15,7 +15,8 @@ DEFAULT_PREFERENCE_shr = "1"
SRC_URI += " \
file://dolt-fix-1.7.0.patch \
file://randr-support-1.7.0.patch \
- file://hack-fbdev-ignore-return-mode.patch \
+ file://hack-fbdev-ignore-return-mode.patch \
+ file://0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch \
"
SRC_URI[archive.md5sum] = "d49305baa79772ca965407b0fd2dcb84"
SRC_URI[archive.sha256sum] = "2e7e999da9e23e2daee35715c4432447408ae1edc4bdac0b13e667af58cd5775"