putenv: fix heap corruption with mixed putenv/_putenv
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Feb 2013 21:14:18 +0000 (13:14 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Feb 2013 21:14:47 +0000 (13:14 -0800)
commita828bb24ee96386201c4236ea917677b6c536c7d
tree2a64c9ee1b5ad7fb8bf19374bfbabf1f6e2dfa4a
parent142eb2ee2f26e522b7ab0d8fefb0b3c34201f208
putenv: fix heap corruption with mixed putenv/_putenv

Problem reported by Michael Goffioul in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-02/msg00061.html>.
* lib/putenv.c (putenv) [HAVE__PUTENV]:
Rely on _putenv to allocate the new environment.
* m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
* modules/putenv (configure.ac): Use it.
ChangeLog
lib/putenv.c
m4/putenv.m4
modules/putenv