Patch from Colin Watson: we were sometimes passing stack storage to putenv(),