]> 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>
Wed, 16 Oct 2024 14:21:25 +0000 (17:21 +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 d8a0a7280148083c20d968459a1246cd6e663b85..dcd6adaed55c6ffefb81e893aed6fa6a74aebad3 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`~