Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Allow multiple path separators between/after d...



details:   https://anonhg.NetBSD.org/src/rev/4f06ad0a0bb0
branches:  trunk
changeset: 758092:4f06ad0a0bb0
user:      ws <ws%NetBSD.org@localhost>
date:      Mon Oct 18 11:08:26 2010 +0000

description:
Allow multiple path separators between/after directory names.
Problem found while analyzing PR kern/43963.

diffstat:

 sys/lib/libsa/cd9660.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 7596efe90989 -r 4f06ad0a0bb0 sys/lib/libsa/cd9660.c
--- a/sys/lib/libsa/cd9660.c    Mon Oct 18 00:09:13 2010 +0000
+++ b/sys/lib/libsa/cd9660.c    Mon Oct 18 11:08:26 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660.c,v 1.25 2010/03/22 16:57:54 jakllsch Exp $     */
+/*     $NetBSD: cd9660.c,v 1.26 2010/10/18 11:08:26 ws Exp $   */
 
 /*
  * Copyright (C) 1996 Wolfgang Solfrank.
@@ -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)



Home | Main Index | Thread Index | Old Index