RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 28-Mar-2009 14:45:49 Branch: rpm-5_1 Handle: 2009032813454801 Modified files: (Branch: rpm-5_1) rpm CHANGES rpm/rpmio macro.c Log: - fix: handle ./../foo paths correctly (#491388). Summary: Revision Changes Path 1.2288.2.253+1 -0 rpm/CHANGES 2.193.2.9 +5 -4 rpm/rpmio/macro.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.2288.2.252 -r1.2288.2.253 CHANGES --- rpm/CHANGES 27 Mar 2009 21:18:18 -0000 1.2288.2.252 +++ rpm/CHANGES 28 Mar 2009 13:45:48 -0000 1.2288.2.253 @@ -1,4 +1,5 @@ 5.1.7 -> 5.1.8: + - jbj: fix: handle ./../foo paths correctly (#491388). - jbj: rpmlib: rescusitate splint annotations. - jbj: rpmdb: rescusitate splint annotations. - jbj: rpmtsOrder: fully enable parentdir deps when ordering. @@ . patch -p0 <<'@@ .' Index: rpm/rpmio/macro.c ============================================================================ $ cvs diff -u -r2.193.2.8 -r2.193.2.9 macro.c --- rpm/rpmio/macro.c 16 Mar 2009 10:32:05 -0000 2.193.2.8 +++ rpm/rpmio/macro.c 28 Mar 2009 13:45:49 -0000 2.193.2.9 @@ -2646,10 +2646,11 @@ if (begin && s[1] == '\0') { /*...@switchbreak@*/ break; } - /* Trim embedded ./ , trailing /. */ - if ((t[-1] == '/' && s[1] == '\0') || (t > path && t[-1] == '/' && s[1] == '/')) { - s++; - continue; + if (t > path && t[-1] == '/') + switch (s[1]) { + case '/': s++; /*...@fallthrough@*/ /* Trim embedded ./ */ + case '\0': s++; continue; /* Trim trailing /. */ + default: break; } /* Trim embedded /../ and trailing /.. */ if (!begin && t > path && t[-1] == '/' && s[1] == '.' && (s[2] == '/' || s[2] == '\0')) { @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org