about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/pattern.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 63bf0263b..160791f5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-10  Peter Stephenson  <pws@csr.com>
+
+	* 17994: Src/pattern.c: A set of globbing flags with no effect
+	could hang the shell as the pattern wasn't compiled consistently.
+
 2002-12-06  Felix Rosencrantz <f_rosencrantz@yahoo.com>
 
 	* 17983: Src/Zle/zle_hist.c, Src/Zle/zle_params.c, Doc/Zsh/zle.yo:
diff --git a/Src/pattern.c b/Src/pattern.c
index 33c8858a2..71f2f379c 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -688,7 +688,10 @@ patcompbranch(int *flagp)
 			continue;
 		    }
 		}
-	    }
+	    } else if (!*patparse)
+		break;
+	    else
+		continue;
 	} else if (isset(EXTENDEDGLOB) && *patparse == Hat) {
 	    /*
 	     * ^pat:  anything but pat.  For proper backtracking,