- pull in upstream crash fix (#1128390)
- use %autosetup
- -devel: tighten subpkg dep via %_isa
- -devel-docs: fix Summary
This commit is contained in:
Rex Dieter 2015-03-18 08:08:23 -05:00
parent 9c132c671f
commit 56f1ad5ef7
2 changed files with 54 additions and 4 deletions

View File

@ -0,0 +1,40 @@
From 2510148b16a71504dff3880c8af416fd85a2885d Mon Sep 17 00:00:00 2001
From: Vlad Orlov <monsta@inbox.ru>
Date: Fri, 13 Mar 2015 13:17:31 +0100
Subject: [PATCH 5/5] lib: Fix crash on uninitialized variant
Initialize the GVariant* pointers, so that they aren't uninitialized when
jumping to "out:" and unref'ing them.
https://bugs.freedesktop.org/show_bug.cgi?id=89476
https://bugs.debian.org/774546
https://bugs.launchpad.net/ubuntu-mate/+bug/1428337
---
libupower-glib/up-device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c
index 9f6e0e1..f053f3d 100644
--- a/libupower-glib/up-device.c
+++ b/libupower-glib/up-device.c
@@ -422,7 +422,7 @@ GPtrArray *
up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
- GVariant *gva;
+ GVariant *gva = NULL;
guint i;
GPtrArray *array = NULL;
gboolean ret;
@@ -502,7 +502,7 @@ GPtrArray *
up_device_get_statistics_sync (UpDevice *device, const gchar *type, GCancellable *cancellable, GError **error)
{
GError *error_local = NULL;
- GVariant *gva;
+ GVariant *gva = NULL;
guint i;
GPtrArray *array = NULL;
gboolean ret;
--
1.9.3

View File

@ -1,11 +1,15 @@
Summary: Power Management Service
Name: upower
Version: 0.99.2
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://upower.freedesktop.org/
Source0: http://upower.freedesktop.org/releases/upower-%{version}.tar.xz
## upstream fixes
Patch5: 0005-lib-Fix-crash-on-uninitialized-variant.patch
BuildRequires: sqlite-devel
BuildRequires: libtool
BuildRequires: intltool
@ -35,13 +39,13 @@ line tools for managing power devices attached to the system.
%package devel
Summary: Headers and libraries for UPower
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Headers and libraries for UPower.
%package devel-docs
Summary: Headers and libraries for UPower
Summary: Developer documentation for for libupower-glib
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
@ -49,7 +53,7 @@ BuildArch: noarch
Developer documentation for for libupower-glib.
%prep
%setup -q
%autosetup -p1
%build
%configure \
@ -109,6 +113,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%{_datadir}/gtk-doc/html/UPower/*
%changelog
* Wed Mar 18 2015 Rex Dieter <rdieter@fedoraproject.org> - 0.99.2-4
- pull in upstream crash fix (#1128390)
- use %%autosetup
- -devel: tighten subpkg dep via %%_isa
- -devel-docs: fix Summary
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 0.99.2-3
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code