running egl with egl_x11_swrast driver i receive a segfault because
x11_screen_probe_dri2 returns a NULL driver_name.
This patch checks if the driver_name is null.
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -70,7 +70,8 @@ native_create_probe(EGLNativeDisplayType dpy)
if (xscr) {
if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
driver_name = x11_screen_probe_dri2(xscr);
- nprobe->data = strdup(driver_name);
+ if (driver_name)
+ nprobe->data = strdup(driver_name);
}
x11_screen_destroy(xscr);
--
1.6.3.3
From 7ed634c927dc388ae2475766edf48b9ca88fb07f Mon Sep 17 00:00:00 2001
From: Igor Oliveira <igor.olive...@openbossa.org>
Date: Sun, 24 Jan 2010 12:26:31 -0400
Subject: [PATCH] egl: check if driver_name is null
---
src/gallium/state_trackers/egl/x11/native_x11.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/state_trackers/egl/x11/native_x11.c b/src/gallium/state_trackers/egl/x11/native_x11.c
index 695ab88..dd3c9f8 100644
--- a/src/gallium/state_trackers/egl/x11/native_x11.c
+++ b/src/gallium/state_trackers/egl/x11/native_x11.c
@@ -70,7 +70,8 @@ native_create_probe(EGLNativeDisplayType dpy)
if (xscr) {
if (x11_screen_support(xscr, X11_SCREEN_EXTENSION_DRI2)) {
driver_name = x11_screen_probe_dri2(xscr);
- nprobe->data = strdup(driver_name);
+ if (driver_name)
+ nprobe->data = strdup(driver_name);
}
x11_screen_destroy(xscr);
--
1.6.3.3
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev