]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool.m4: Avoid word splitting on untrusted inputs
authorBruno Haible <bruno@clisp.org>
Tue, 15 Oct 2024 21:03:00 +0000 (23:03 +0200)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Tue, 22 Oct 2024 17:02:15 +0000 (20:02 +0300)
If $multilib is set to more than one word, the following error can be
seen during configuration:

test: too many arguments

* m4/libtool.m4: Wrap variable in quotes.

m4/libtool.m4

index 5c748ab2a1e5e8b86be8ec0a47e8b1c3e521ad46..4b1b9d9365b4877252db21d12b86040af5396b7a 100644 (file)
@@ -2584,7 +2584,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*)
     # If user builds GCC with multilib enabled,
     # it should just install on $(libdir)
     # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
-    if test xyes = x$multilib; then
+    if test xyes = x"$multilib"; then
       postinstall_cmds='base_file=`basename \$file`~
         dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
         dldir=$destdir/`dirname \$dlpath`~