]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path
authorAndreas Schwab <schwab@suse.de>
Thu, 4 Apr 2002 13:35:05 +0000 (13:35 +0000)
committerAndreas Schwab <schwab@suse.de>
Thu, 4 Apr 2002 13:35:05 +0000 (13:35 +0000)
contains no literal separators.

ChangeLog
lib/m4sugar/m4sh.m4

index 5f8039c941988b55f0c07d0dc1f98d87405f3b57..df99423eeff54fd8c8bf07e15b2a7932b567cd41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-04  Andreas Schwab  <schwab@suse.de>
+
+       * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path
+       contains no literal separators.
+
 2002-04-03  Akim Demaille  <akim@epita.fr>
 
        * lib/autoconf/status.m4 (_AC_CONFIG_FILE, _AC_CONFIG_HEADER)
index 85b3cf41425d8cd9a24e35950a47d6e7771d76c3..ccba5accf8984165041765d6d30c24e5546ad0e2 100644 (file)
@@ -626,13 +626,14 @@ fi
 # Still very private as its interface looks quite bad.
 #
 # `$as_dummy' forces splitting on constant user-supplied paths.
-# POSIX.2 word splitting is done only on the output of word
-# expansions, not every word.  This closes a longstanding sh security
-# hole.  Optimize it away when not needed.
+# POSIX.2 field splitting is done only on the result of word
+# expansions, not on literal text.  This closes a longstanding sh security
+# hole.  Optimize it away when not needed, i.e., if there are no literal
+# path separators.
 m4_define([_AS_PATH_WALK],
 [AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])dnl
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-AS_LITERAL_IF(m4_default([$1], [$PATH]),
+m4_bmatch([$1], [[:;]],
 [as_dummy="$1"
 for as_dir in $as_dummy],
 [for as_dir in m4_default([$1], [$PATH])])