Blob Blame History Raw
--- 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));
     }
 }