diff --git a/sed-4.1.5-follow.patch b/sed-4.1.5-follow.patch index 4fcb36b..d5c2f7b 100644 --- a/sed-4.1.5-follow.patch +++ b/sed-4.1.5-follow.patch @@ -71,10 +71,10 @@ diff -Burp sed-4.1.5-orig/lib/utils.c sed-4.1.5-follow/lib/utils.c + buf2 [err] = '\0'; + + /* need to handle relative paths with care */ -+ if (buf2[0] != '/') ++ dir = dirname (buf); // dir part of orig path ++ int len = strlen (dir); // orig path len ++ if (buf2[0] != '/' && len != 1 && dir[0] != '.') + { -+ dir = dirname (buf); // dir part of orig path -+ int len = strlen (dir); // orig path len + buf[len] = '/'; + strncpy (buf+len+1, buf2, bufsize - len - 1); + if (buf[bufsize-1] != 0) diff --git a/sed.spec b/sed.spec index ee4df5d..d00e76f 100644 --- a/sed.spec +++ b/sed.spec @@ -6,7 +6,7 @@ Summary: A GNU stream text editor Name: sed Version: 4.1.5 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ Group: Applications/Text URL: http://sed.sourceforge.net/ @@ -70,6 +70,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man*/* %changelog +* Thu Nov 13 2008 Jiri Moskovcak 4.1.5-11 +- improved follow.patch (thanks to Arkadiusz Miskiewicz for initial patch) +- Resolves: #470912 + * Tue Feb 19 2008 Fedora Release Engineering - 4.1.5-10 - Autorebuild for GCC 4.3