From b09e001d698764b9b5e0e1ce5a76ac1d2c4e407d Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 29 Sep 2020 23:48:39 +0200 Subject: [PATCH] Fix regexp detection In a case exprssion, `|` separates patterns so it needs to be quoted. Also `\` was not actually part of the set since it was quoting another character. Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 8adbdc3a8..3d5fa0d47 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -1044,7 +1044,7 @@ need_grep= case "$FILTER" in '^$') simple_filter=;; '.*') simple_filter='*';; - *[][\$^+*?{|}]*) # Regexp special characters (other than .), we need grep + *[][$+*?\\^{\|}]*) # Regexp special characters (other than .), we need grep need_grep=1;; *) # No regexp or shell-pattern special character simple_filter="*$FILTER*";; @@ -1052,7 +1052,7 @@ esac case "$EXCLUDE" in '^$') simple_exclude=;; '.*') simple_exclude='*';; - *[][\$^+*?{|}]*) # Regexp special characters (other than .), we need grep + *[][$+*?\\^{\|}]*) # Regexp special characters (other than .), we need grep need_grep=1;; *) # No regexp or shell-pattern special character simple_exclude="*$EXCLUDE*";;