From b7aaa72631bac1d6dfdc632c3f5c8adfb1361b6a Mon Sep 17 00:00:00 2001 From: Jiří Moskovčák Date: Jun 18 2008 09:31:37 +0000 Subject: fixed problem when ircp tries to write files to / (rhbz#451493) --- diff --git a/openobex-1.3-ircp.patch b/openobex-1.3-ircp.patch new file mode 100644 index 0000000..9d69ccc --- /dev/null +++ b/openobex-1.3-ircp.patch @@ -0,0 +1,29 @@ +--- openobex-1.3/ircp/ircp_io.c 2006-01-18 15:02:14.000000000 +0200 ++++ openobex-1.3_ircp_io/ircp/ircp_io.c 2008-06-14 11:25:53.000000000 +0300 +@@ -127,8 +127,11 @@ + return -1; + + //TODO! Rename file if already exist. +- +- snprintf(diskname, MAXPATHLEN, "%s/%s", path, name); ++ if (strnlen(path,MAXPATHLEN)!=0) { ++ snprintf(diskname, MAXPATHLEN, "%s/%s", path, name); ++ } else { ++ strncpy(diskname, name, MAXPATHLEN); ++ } + + DEBUG(4, "Creating file %s\n", diskname); + +@@ -150,7 +153,11 @@ + return -1; + } + +- snprintf(newpath, MAXPATHLEN, "%s/%s", path, dir); ++ if (strnlen(path,MAXPATHLEN)!=0) { ++ snprintf(newpath, MAXPATHLEN, "%s/%s", path, dir); ++ } else { ++ strncpy(newpath, dir, MAXPATHLEN); ++ } + + DEBUG(4, "path = %s dir = %s, flags = %d\n", path, dir, flags); + if(stat(newpath, &statbuf) == 0) { diff --git a/openobex.spec b/openobex.spec index dcaf3fb..9e8dbc5 100644 --- a/openobex.spec +++ b/openobex.spec @@ -1,7 +1,7 @@ Summary: Library for using OBEX Name: openobex Version: 1.3 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://openobex.sourceforge.net @@ -11,6 +11,7 @@ Patch1: openobex-1.3-push.patch Patch2: openobex-1.3-autoconf.patch Patch3: openobex-1.3-ipv6.patch Patch4: openobex-1.3-utf.patch +Patch5: openobex-1.3-ircp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf >= 2.57, bluez-libs-devel, sed, libusb-devel @@ -47,6 +48,7 @@ calendar entries (vCal) and business cards (vCard) using the OBEX protocol. %patch2 -p1 -b .ipv6 %patch3 -p1 -b .autoconf %patch4 -p1 -b .utf +%patch5 -p1 -b .ircp autoreconf --install --force %build @@ -91,6 +93,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jun 18 2008 Jiri Moskovcak 1.3-12 +- fixed problem when ircp tries to write files to / +- Resolves: #451493 + * Fri Jun 6 2008 Jiri Moskovcak 1.3-11 - Improved utf support - Resolves: #430128