Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 5b8b6132026058084c61b740d28c4765 > files > 3

tar-1.15.1-23.0.1.el5.src.rpm

--- tar-1.15.1/src/names.c.dot_dot_vuln	2004-09-06 13:30:54.000000000 +0200
+++ tar-1.15.1/src/names.c	2007-08-17 11:01:15.000000000 +0200
@@ -1152,11 +1152,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));
     }
 }