NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/43963: libsa cd9660.c pathname lookup problem



The following reply was made to PR kern/43963; it has been noted by GNATS.

From: Wolfgang Solfrank <Wolfgang%Solfrank.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
 netbsd-bugs%netbsd.org@localhost, minoura%smtp.minoura.org@localhost
Subject: Re: kern/43963: libsa cd9660.c pathname lookup problem
Date: Fri, 15 Oct 2010 13:50:18 +0200

 This is a multi-part message in MIME format.
 --------------020504090603020104070009
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 ok, further investigation reveals that there is nothing wrong with the
 original code (except for the issue with multiple path separators.)
 The in-tree-code does exactly what it is designed to do.
 
 Note that the recipe from the How-to-Repeat in the PR does indeed fail,
 but that's the result of the '-' character in the filename, which is
 invalid in 9660 filenames, and not the result of some incorrectly
 parsed tables.  Note also, that the fix proposed in the PR doesn't do
 anything to change this.
 
 I'd be happy to change the code to handle the multiple '/' issue (see
 attached patch), but other than that, IMHO this PR should be closed.
 
 Ciao,
 Wolfgang
 -- 
 Wolfgang%Solfrank.net@localhost                          Wolfgang Solfrank
 
 --------------020504090603020104070009
 Content-Type: text/plain;
  name="diffs"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="diffs"
 
 Index: cd9660.c
 ===================================================================
 RCS file: /cvsroot/src/sys/lib/libsa/cd9660.c,v
 retrieving revision 1.25
 diff -u -r1.25 cd9660.c
 --- cd9660.c   22 Mar 2010 16:57:54 -0000      1.25
 +++ cd9660.c   15 Oct 2010 11:19:17 -0000
 @@ -196,13 +196,14 @@
        bno = isonum_732(pp->block) + isonum_711(pp->extlen);
  
        rc = ENOENT;
 -      /*
 -       * Remove extra separators
 -       */
 -      while (*path == '/')
 -              path++;
  
        while (*path) {
 +              /*
 +               * Remove extra separators
 +               */
 +              while (*path == '/')
 +                      path++;
 +
                if ((char *)pp >= (char *)buf + psize)
                        break;
                if (isonum_722(pp->parent) != parent)
 
 --------------020504090603020104070009--
 


Home | Main Index | Thread Index | Old Index