[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IFS clobbering

From: Andreas Schwab
Subject: Re: IFS clobbering
Date: Wed, 18 Jul 2012 22:23:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Eric Blake <address@hidden> writes:

> We need to document this issue if we decide this is important enough to
> fix in autoconf.  But a patch for this issue seems like a reasonable
> improvement to me.  Would you like to help write one?

How about this?


>From e45f558825d68ae898153c33c710ac377016fc8d Mon Sep 17 00:00:00 2001
From: Andreas Schwab <address@hidden>
Date: Tue, 22 Nov 2011 00:36:46 +0100
Subject: [PATCH] general: Sanitize IFS in EXIT trap

IFS may be modified temporarily when the configure script receives a
signal.  Make sure the EXIT trap uses the standard value.

* lib/autoconf/general.m4: Sanitize IFS in trap.
 lib/autoconf/general.m4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index adfae1d..d06fdf5 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -1266,6 +1266,8 @@ AS_UNSET(ac_configure_args1)
 # WARNING: Use '\'' to represent an apostrophe within the trap.
 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
+  # Sanitize IFS.
+  IFS=" ""     $as_nl"
   # Save into config.log some information that might help in debugging.

Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]