* glob.c (amatch, case '*'): Treat multiple asterisks the same as one
authorKen Raeburn <raeburn@mit.edu>
Tue, 21 Aug 2001 23:40:31 +0000 (23:40 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 21 Aug 2001 23:40:31 +0000 (23:40 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13682 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/gssftp/ftp/ChangeLog
src/appl/gssftp/ftp/glob.c

index 490be31b65ee14f8ec1fe35ee2e230e000fb879b..5d774f566ee1ce23ac245ef2317b1bf1f8f9ba79 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-21  Ken Raeburn  <raeburn@mit.edu>
+
+       * glob.c (amatch, case '*'): Treat multiple asterisks the same as
+       one.
+
 2001-07-30  Ezra Peisach  <epeisach@mit.edu>
 
        * ftp.c: Declare mech_type in struct gss_trials gss_OID to be
index d0e7314af3b5e254eeb0910bd1e8ad504af15d4a..4b760f25b5350ca237483bf82ff8c8035ef162af 100644 (file)
@@ -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 == '/') {