[oe-commits] Martin Jansa : xserver-xorg-1.8.99.903: add patch for segmentation fault while adding modes without name

git version control git at git.openembedded.org
Tue Jun 29 15:22:47 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 39084da9b9c62d46fa93df9dbd722a49b39663a3
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=39084da9b9c62d46fa93df9dbd722a49b39663a3

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Tue Jun 29 14:22:55 2010 +0200

xserver-xorg-1.8.99.903: add patch for segmentation fault while adding modes without name

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 ...ake-sure-that-DisplayModeRec-name-is-init.patch |   35 ++++++++++++++++++++
 recipes/xorg-xserver/xserver-xorg_1.8.99.903.bb    |    3 +-
 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 0000000..b87d976
--- /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 at 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 at 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 b8b27ad..142ea61 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"





More information about the Openembedded-commits mailing list