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:20
  Branch: HEAD                             Handle: 2009032813451901

  Modified files:
    rpm                     CHANGES
    rpm/rpmio               macro.c

  Log:
    - fix: handle ./../foo paths correctly (#491388).

  Summary:
    Revision    Changes     Path
    1.2883      +1  -0      rpm/CHANGES
    2.214       +5  -4      rpm/rpmio/macro.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2882 -r1.2883 CHANGES
  --- rpm/CHANGES       27 Mar 2009 21:17:41 -0000      1.2882
  +++ rpm/CHANGES       28 Mar 2009 13:45:19 -0000      1.2883
  @@ -1,5 +1,6 @@
   
   5.2a3 -> 5.2a4:
  +    - 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.213 -r2.214 macro.c
  --- rpm/rpmio/macro.c 16 Mar 2009 14:24:46 -0000      2.213
  +++ rpm/rpmio/macro.c 28 Mar 2009 13:45:20 -0000      2.214
  @@ -2669,10 +2669,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

Reply via email to