From 48fae7f628763c734e9fe2b85a8e712a57a4dc3a Mon Sep 17 00:00:00 2001 From: max Date: Thu, 7 Nov 2019 07:45:55 +0100 Subject: [PATCH] Escaping of $SED in the autotools configure script Change $SED to "${SED}" such that the IFS is not used to split the output of that variable. Fixes bug #78788 for relative paths in combination with "." as IFS --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 038a3fbb9fa8d..40bb1a57ecbd1 100644 --- a/configure.ac +++ b/configure.ac @@ -109,7 +109,7 @@ extern "C++" { ]) ac_IFS=$IFS; IFS="." -set $(echo AC_PACKAGE_VERSION | $SED 's/\([[0-9\.]]*\)\(.*\)/\1\.\2/') +set $(echo AC_PACKAGE_VERSION | "${SED}" 's/\([[0-9\.]]*\)\(.*\)/\1\.\2/') IFS=$ac_IFS PHP_MAJOR_VERSION=[$]1 PHP_MINOR_VERSION=[$]2 @@ -806,8 +806,8 @@ if test "$PHP_GCOV" = "yes"; then dnl Remove all optimization flags from CFLAGS. changequote({,}) - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` - CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` + CFLAGS=`echo "$CFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'` + CXXFLAGS=`echo "$CXXFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'` changequote([,]) dnl Add the special gcc flags. @@ -826,8 +826,8 @@ if test "$PHP_DEBUG" = "yes"; then PHP_DEBUG=1 ZEND_DEBUG=yes changequote({,}) - CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'` - CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'` + CFLAGS=`echo "$CFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'` + CXXFLAGS=`echo "$CXXFLAGS" | "${SED}" -e 's/-O[0-9s]*//g'` changequote([,]) dnl Add -O0 only if GCC or ICC is used. if test "$GCC" = "yes" || test "$ICC" = "yes"; then @@ -1210,7 +1210,7 @@ libdir=`eval echo $libdir` datadir=`eval eval echo $datadir` dnl Build extension directory path. -ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO //'` +ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO ' $srcdir/Zend/zend_modules.h|"${SED}" 's/#define ZEND_MODULE_API_NO //'` if test -z "$EXTENSION_DIR"; then extbasedir=$ZEND_MODULE_API_NO