From 47a5a676e46d60136bed62d7d25c9dd66be24706 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 21 Aug 2001 23:40:31 +0000 Subject: [PATCH] * glob.c (amatch, case '*'): Treat multiple asterisks the same as one git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13682 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gssftp/ftp/ChangeLog | 5 +++++ src/appl/gssftp/ftp/glob.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index 490be31b6..5d774f566 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,8 @@ +2001-08-21 Ken Raeburn + + * glob.c (amatch, case '*'): Treat multiple asterisks the same as + one. + 2001-07-30 Ezra Peisach * ftp.c: Declare mech_type in struct gss_trials gss_OID to be diff --git a/src/appl/gssftp/ftp/glob.c b/src/appl/gssftp/ftp/glob.c index d0e7314af..4b760f25b 100644 --- a/src/appl/gssftp/ftp/glob.c +++ b/src/appl/gssftp/ftp/glob.c @@ -469,6 +469,12 @@ amatch(s, p) continue; case '*': + /* Multiple stars are equivalent to one. + Don't chew up cpu time with O(n**2) + recursion if a long string of them is + given. */ + while (*p == '*') + p++; if (!*p) return (1); if (*p == '/') { -- 2.26.2