]> Dogcows Code - chaz/tar/commitdiff
(contains_dot_dot): Fix double-dot recognition in case of duplicate /. Patch by Dmitr...
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Aug 2007 08:25:00 +0000 (08:25 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 12 Aug 2007 08:25:00 +0000 (08:25 +0000)
src/names.c

index 69ab00ebf0ebf8c49225138761cb4c8a7129dff6..585ad39ba7238ff6e7583a6afe89c08c6da35923 100644 (file)
@@ -1012,11 +1012,10 @@ contains_dot_dot (char const *name)
       if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
        return 1;
 
-      do
+      while (! ISSLASH (*p))
        {
          if (! *p++)
            return 0;
        }
-      while (! ISSLASH (*p));
     }
 }
This page took 0.027069 seconds and 4 git commands to generate.