From f91f7bc3abf1676b33de0485b41e785a3fbd1f96 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 15 Oct 2024 23:03:00 +0200 Subject: [PATCH] libtool.m4: Avoid word splitting on untrusted inputs 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 5c748ab2..4b1b9d93 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -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`~