From 04266f09b0d2c31d6cfb6148eada4550fe478f29 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 18 Mar 2022 17:56:14 -0700 Subject: configure: bugfix in shell escaping code * configure: in the case when the argument contains single quotes, we try to identify the subcase that cannot use double quotes instead. That subcase is not correctly identified: it occurs when there are double quotes, dollar signs **or backslashes**. For instance the data '\ cannot be put into double quotes as "'\" on account of the backslash, which is an active character in double quotes. We also simplify the pattern by using a character class. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index f001ba97..41533afb 100755 --- a/configure +++ b/configure @@ -92,7 +92,7 @@ for arg in "$0" ${@+"$@"} ; do case $arg in *"'"* ) case $arg in - *'"'* | *'$'* ) + *[\"\$\\]* ) cmdline="$cmdline'$(printf "%s" "$arg" | sed -e "s/'/'\\\\''/g")'" ;; * ) -- cgit v1.2.3