Subject: [Boost-bugs] [Boost C++ Libraries] #3319: environment.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-06 14:54:20
#3319: environment.hpp
--------------------------+-------------------------------------------------
Reporter: anonymous | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: None
Version: Boost 1.39.0 | Severity: Problem
Keywords: |
--------------------------+-------------------------------------------------
Hi there, in the function
inline environment::environment(void)
in the BOOST_PROCESS_WIN32_API defnition you supply the wrong pointer to
the FreeEnvironmentStrings() function. Currently you're passing the
pointer that was incremented to process the variable. You should be
providing the original pointer to the heap.
Should be:
TCHAR* es = ::GetEnvironmentStrings();
TCHAR* es2 = es;
// do your iterating with es
::FreeEnvironmentStrings(es2);
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3319> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC