diff --git a/.atk.metadata b/.atk.metadata index 2e1bb18..66f9b55 100644 --- a/.atk.metadata +++ b/.atk.metadata @@ -1 +1 @@ -b803d055c8e2f786782803b7d21e413718321db7 SOURCES/atk-2.14.0.tar.xz +bcb9ee62a0fd1d9262684d20b429bc8f5b2c4eaa SOURCES/atk-2.22.0.tar.xz diff --git a/.gitignore b/.gitignore index 058e76c..b9480af 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/atk-2.14.0.tar.xz +SOURCES/atk-2.22.0.tar.xz diff --git a/SOURCES/atk-invalid-unref.patch b/SOURCES/atk-invalid-unref.patch new file mode 100644 index 0000000..35f9c2f --- /dev/null +++ b/SOURCES/atk-invalid-unref.patch @@ -0,0 +1,11 @@ +diff -up atk-2.22.0/atk/atkgobjectaccessible.c.invalid-unref atk-2.22.0/atk/atkgobjectaccessible.c +--- atk-2.22.0/atk/atkgobjectaccessible.c.invalid-unref 2017-05-30 18:32:22.067833190 +0200 ++++ atk-2.22.0/atk/atkgobjectaccessible.c 2017-05-30 18:32:43.864810009 +0200 +@@ -163,7 +163,6 @@ atk_gobject_accessible_object_gone_cb (g + g_object_set_qdata (G_OBJECT (data), quark_object, NULL); + atk_object_notify_state_change (ATK_OBJECT (data), ATK_STATE_DEFUNCT, + TRUE); +- g_object_unref (data); + } + + static void diff --git a/SOURCES/atk-use-after-free.patch b/SOURCES/atk-use-after-free.patch new file mode 100644 index 0000000..ddd1254 --- /dev/null +++ b/SOURCES/atk-use-after-free.patch @@ -0,0 +1,77 @@ +diff -up atk-2.22.0/atk/atkgobjectaccessible.c.use-after-free atk-2.22.0/atk/atkgobjectaccessible.c +--- atk-2.22.0/atk/atkgobjectaccessible.c.use-after-free 2016-09-19 15:26:16.000000000 +0200 ++++ atk-2.22.0/atk/atkgobjectaccessible.c 2017-05-22 19:31:40.538875766 +0200 +@@ -37,7 +37,7 @@ + static void atk_gobject_accessible_class_init (AtkGObjectAccessibleClass *klass); + static void atk_real_gobject_accessible_initialize (AtkObject *atk_obj, + gpointer data); +-static void atk_gobject_accessible_dispose (gpointer data); ++static void atk_gobject_accessible_object_gone_cb (gpointer data); + + static GQuark quark_accessible_object = 0; + static GQuark quark_object = 0; +@@ -88,8 +88,7 @@ atk_gobject_accessible_for_object (GObje + g_return_val_if_fail (G_IS_OBJECT (obj), NULL); + /* See if we have a cached accessible for this object */ + +- accessible = g_object_get_qdata (obj, +- quark_accessible_object); ++ accessible = quark_accessible_object ? g_object_get_qdata (obj, quark_accessible_object) : NULL; + + if (!accessible) + { +@@ -146,12 +145,12 @@ atk_real_gobject_accessible_initialize ( + atk_obj->layer = ATK_LAYER_WIDGET; + + g_object_weak_ref (data, +- (GWeakNotify) atk_gobject_accessible_dispose, ++ (GWeakNotify) atk_gobject_accessible_object_gone_cb, + atk_gobj); + } + + static void +-atk_gobject_accessible_dispose (gpointer data) ++atk_gobject_accessible_object_gone_cb (gpointer data) + { + GObject *object; + +@@ -168,9 +167,29 @@ atk_gobject_accessible_dispose (gpointer + } + + static void ++atk_gobject_accessible_dispose (GObject *atk_obj) ++{ ++ GObject *obj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (atk_obj)); ++ ++ if (obj) { ++ g_object_set_qdata (obj, quark_accessible_object, NULL); ++ g_object_weak_unref (obj, ++ (GWeakNotify) atk_gobject_accessible_object_gone_cb, ++ atk_obj); ++ ++ g_object_set_qdata (atk_obj, quark_object, NULL); ++ atk_object_notify_state_change (ATK_OBJECT (atk_obj), ATK_STATE_DEFUNCT, ++ TRUE); ++ } ++ ++ G_OBJECT_CLASS (parent_class)->dispose (atk_obj); ++} ++ ++static void + atk_gobject_accessible_class_init (AtkGObjectAccessibleClass *klass) + { + AtkObjectClass *class; ++ GObjectClass *object_class; + + class = ATK_OBJECT_CLASS (klass); + +@@ -178,6 +197,9 @@ atk_gobject_accessible_class_init (AtkGO + + class->initialize = atk_real_gobject_accessible_initialize; + ++ object_class = G_OBJECT_CLASS (klass); ++ object_class->dispose = atk_gobject_accessible_dispose; ++ + if (!quark_accessible_object) + quark_accessible_object = g_quark_from_static_string ("accessible-object"); + quark_object = g_quark_from_static_string ("object-for-accessible"); diff --git a/SPECS/atk.spec b/SPECS/atk.spec index 9d8fd00..9563df6 100644 --- a/SPECS/atk.spec +++ b/SPECS/atk.spec @@ -1,15 +1,18 @@ %define glib2_version 2.31.2 %define gobject_introspection_version 0.9.6 -Summary: Interfaces for accessibility support Name: atk -Version: 2.14.0 -Release: 1%{?dist} +Version: 2.22.0 +Release: 3%{?dist} +Summary: Interfaces for accessibility support + License: LGPLv2+ -Group: System Environment/Libraries -#VCS: git:git://git.gnome.org/atk -Source: http://download.gnome.org/sources/atk/2.14/atk-%{version}.tar.xz URL: http://developer.gnome.org/platform-overview/stable/atk +Source0: http://download.gnome.org/sources/atk/2.22/atk-%{version}.tar.xz + +Patch01: atk-use-after-free.patch +Patch02: atk-invalid-unref.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gettext BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -25,7 +28,6 @@ devices. %package devel Summary: Development files for the ATK accessibility toolkit -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -34,6 +36,8 @@ needed for development of applications or toolkits which use ATK. %prep %setup -q +%patch01 -p1 -b .use-after-free +%patch02 -p1 -b .invalid-unref %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -41,7 +45,7 @@ needed for development of applications or toolkits which use ATK. make %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT +%make_install rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -53,7 +57,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %files -f atk10.lang -%doc README AUTHORS COPYING NEWS +%license COPYING +%doc README AUTHORS NEWS %{_libdir}/libatk-1.0.so.* %{_libdir}/girepository-1.0 @@ -65,6 +70,18 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_datadir}/gir-1.0 %changelog +* Wed May 31 2017 Milan Crha - 2.22.0-3 +- Add patch to fix invalid unref at atk_gobject_accessible_object_gone_cb() +- Resolves: #1457206 + +* Tue May 23 2017 Milan Crha - 2.22.0-2 +- Add patch to fix crash under atk_gobject_accessible_dispose() +- Resolves: #1444405 + +* Mon Sep 19 2016 Kalev Lember - 2.22.0-1 +- Update to 2.22.0 +- Resolves: #1386807 + * Mon Sep 22 2014 Kalev Lember - 2.14.0-1 - Update to 2.14.0 - Resolves: #1174433