From ab6f1a632d64f6a5614f8574feec2656dfd84578 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 10 Dec 2002 12:51:43 +0000 Subject: 17994: Globbing flags with no effect could hang the shell --- Src/pattern.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src') 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, -- cgit 1.4.1