From c6d4174a0498c1f19e4e00d8f8448e97adbfe5fa Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 13 Aug 2007 17:03:16 +0000 Subject: [PATCH] fix a bad free --- bad-free.patch | 41 +++++++++++++++++++++++++++++++++++++++++ libgnomekbd.spec | 8 +++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 bad-free.patch diff --git a/bad-free.patch b/bad-free.patch new file mode 100644 index 0000000..d87c337 --- /dev/null +++ b/bad-free.patch @@ -0,0 +1,41 @@ +diff -up libgnomekbd-2.19.90/libgnomekbd/gkbd-indicator-config.c.bad-free libgnomekbd-2.19.90/libgnomekbd/gkbd-indicator-config.c +--- libgnomekbd-2.19.90/libgnomekbd/gkbd-indicator-config.c.bad-free 2007-08-13 12:47:51.000000000 -0400 ++++ libgnomekbd-2.19.90/libgnomekbd/gkbd-indicator-config.c 2007-08-13 12:49:00.000000000 -0400 +@@ -193,7 +193,7 @@ gkbd_indicator_config_init (GkbdIndicato + GConfClient * conf_client, XklEngine * engine) + { + GError *gerror = NULL; +- gchar *sp, *datadir; ++ gchar *sp; + + memset (ind_config, 0, sizeof (*ind_config)); + ind_config->conf_client = conf_client; +@@ -211,7 +211,6 @@ gkbd_indicator_config_init (GkbdIndicato + + ind_config->icon_theme = gtk_icon_theme_get_default (); + +- datadir = DATADIR; + gtk_icon_theme_append_search_path (ind_config->icon_theme, sp = + g_build_filename (g_get_home_dir + (), +@@ -221,18 +220,17 @@ gkbd_indicator_config_init (GkbdIndicato + + gtk_icon_theme_append_search_path (ind_config->icon_theme, + sp = +- g_build_filename (datadir, ++ g_build_filename (DATADIR, + "pixmaps/flags", + NULL)); + g_free (sp); + + gtk_icon_theme_append_search_path (ind_config->icon_theme, + sp = +- g_build_filename (datadir, ++ g_build_filename (DATADIR, + "icons/flags", + NULL)); + g_free (sp); +- g_free (datadir); + } + + void diff --git a/libgnomekbd.spec b/libgnomekbd.spec index 03058d4..d7684ee 100644 --- a/libgnomekbd.spec +++ b/libgnomekbd.spec @@ -1,6 +1,6 @@ Name: libgnomekbd Version: 2.19.90 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A keyboard configuration library Group: System Environment/Libraries @@ -11,6 +11,8 @@ Source0: http://download.gnome.org/sources/libgnomekbd/2.18/libgnomekbd-% Patch1: libgnomekbd-0.1-werror.patch # http://bugzilla.gnome.org/show_bug.cgi?id=353163 Patch5: libgnomekbd-2.17.2-redraw.patch +# +Patch6: bad-free.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -55,6 +57,7 @@ developing applications that use libgnomekbd. %setup -q %patch1 -p1 -b .werror %patch5 -p1 -b .redraw +%patch6 -p1 -b .bad-free %build %configure --disable-static --enable-compile-warnings=no @@ -123,6 +126,9 @@ touch --no-create %{_datadir}/icons/hicolor || : %changelog +* Mon Aug 13 2007 Matthias Clasen - 2.19.90-2 +- Fix a bad free + * Sun Aug 12 2007 Matthias Clasen - 2.19.90-1 - Update to 2.19.90