From e2b8c8fa9f6567ddf60634650dbb4f5ea3462642 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 12 Aug 2007 08:25:00 +0000 Subject: [PATCH] (contains_dot_dot): Fix double-dot recognition in case of duplicate /. Patch by Dmitry V. Levin. --- src/names.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/names.c b/src/names.c index 69ab00e..585ad39 100644 --- a/src/names.c +++ b/src/names.c @@ -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)); } } -- 2.45.2