diff --git a/libimobiledevice-segfault-fix.patch b/libimobiledevice-segfault-fix.patch new file mode 100644 index 0000000..84f2a7e --- /dev/null +++ b/libimobiledevice-segfault-fix.patch @@ -0,0 +1,14 @@ +The patch fixes segfault when both $XDG_CONFIG_HOME and $HOME are unset +Signed-off-by: Maxim Mikityanskiy +--- 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"); diff --git a/libimobiledevice.changes b/libimobiledevice.changes index 75a1798..efe8292 100644 --- a/libimobiledevice.changes +++ b/libimobiledevice.changes @@ -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 diff --git a/libimobiledevice.spec b/libimobiledevice.spec index 0056d31..f1259e5 100644 --- a/libimobiledevice.spec +++ b/libimobiledevice.spec @@ -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