From 67733e811880b67e8f1e5af0480c2ea231051f99 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Dec 01 2010 07:53:45 +0000 Subject: - Fix crash when libGL reports a NULL rendering string (#658758) --- diff --git a/alleggl-0.4.3-rhbz658758.patch b/alleggl-0.4.3-rhbz658758.patch new file mode 100644 index 0000000..6613829 --- /dev/null +++ b/alleggl-0.4.3-rhbz658758.patch @@ -0,0 +1,16 @@ +diff -up alleggl/src/glext.c~ alleggl/src/glext.c +--- alleggl/src/glext.c~ 2007-05-15 15:37:46.000000000 +0200 ++++ alleggl/src/glext.c 2010-12-01 08:51:23.631386748 +0100 +@@ -450,6 +450,12 @@ static void __fill_in_info_struct(const + struct allegro_gl_info *info) { + const char *renderer = (const char*)rendereru; + ++ /* The render string can be NULL ?? See: ++ https://bugzilla.redhat.com/show_bug.cgi?id=658758 */ ++ if (renderer == NULL) { ++ renderer = "foobar"; ++ } ++ + /* Some cards are "special"... */ + if (strstr(renderer, "3Dfx/Voodoo")) { + info->is_voodoo = 1; diff --git a/alleggl.spec b/alleggl.spec index 7a70336..a6fedd4 100644 --- a/alleggl.spec +++ b/alleggl.spec @@ -1,6 +1,6 @@ Name: alleggl Version: 0.4.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: OpenGL support library for Allegro Group: System Environment/Libraries License: zlib @@ -9,6 +9,7 @@ Source0: http://downloads.sourceforge.net/allegrogl/%{name}-%{version}.ta Patch0: alleggl-0.4.2-gcc43.patch Patch1: alleggl-0.4.3-fullscreen-viewport.patch Patch2: alleggl-0.4.3-make.patch +Patch3: alleggl-0.4.3-rhbz658758.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: allegro-devel libGLU-devel libX11-devel libXext-devel BuildRequires: libXpm-devel libXxf86vm-devel @@ -41,6 +42,7 @@ developing applications that use %{name}. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -91,6 +93,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Dec 1 2010 Hans de Goede 0.4.3-8 +- Fix crash when libGL reports a NULL rendering string (#658758) + * Fri Sep 10 2010 Hans de Goede 0.4.3-7 - Fix FTBFS (#631146)