Accepting request 127522 from mobile:synchronization:FACTORY

- Fix segfault without $XDG_CONFIG_HOME and $HOME set
  (bnc#768537, libiphone#273). (forwarded request 127502 from sbrabec)

OBS-URL: https://build.opensuse.org/request/show/127522
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libimobiledevice?expand=0&rev=22
This commit is contained in:
Ismail Dönmez 2012-07-12 08:46:59 +00:00 committed by Git OBS Bridge
parent 1043bad74c
commit 659df2cda7
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,14 @@
The patch fixes segfault when both $XDG_CONFIG_HOME and $HOME are unset
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
--- src/userpref.c.orig 2012-06-04 17:04:57.387303630 +0300
+++ src/userpref.c 2012-06-04 17:06:05.741301627 +0300
@@ -125,6 +125,9 @@
const char *cdir = getenv("XDG_CONFIG_HOME");
if (!cdir) {
cdir = getenv("HOME");
+ if (!cdir) {
+ cdir="/root";
+ }
strcpy(__config_dir, cdir);
strcat(__config_dir, DIR_SEP_S);
strcat(__config_dir, ".config");

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 9 17:15:08 CEST 2012 - sbrabec@suse.cz
- Fix segfault without $XDG_CONFIG_HOME and $HOME set
(bnc#768537, libiphone#273).
-------------------------------------------------------------------
Wed Jun 20 15:23:07 UTC 2012 - dimstar@opensuse.org

View File

@ -43,6 +43,8 @@ BuildRequires: libusb-1_0-devel >= 1.0.3
Source: %{name}-%{version}.tar.bz2
Source1: baselibs.conf
Patch0: libimobiledevice-cython1.16-detection.patch
# PATCH-FIX-UPSTREAM libimobiledevice-segfault-fix.patch bnc768537 libiphone273 sbrabec@suse.cz -- Fix segfault without $XDG_CONFIG_HOME and $HOME set.
Patch1: libimobiledevice-segfault-fix.patch
Summary: Native protocols library for iPhone, iPod Touch and iPad
License: LGPL-2.1+
Group: System/Libraries
@ -117,6 +119,7 @@ Contains Python bindings for developing applications that use %{_name}.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1
%build
autoreconf -fi