Merge collected bug fixes from Trunk:

Refs #589.
Refs #7032.
Refs #7084.
Refs #6346.

[SVN r79556]
This commit is contained in:
John Maddock
2012-07-16 08:38:23 +00:00
parent 8aa4a1225a
commit a26d66b688
16 changed files with 64 additions and 10 deletions

View File

@ -18,6 +18,7 @@
#define BOOST_REGEX_SOURCE
#include <boost/config.hpp>
#include <memory>
#include <cstring>
#include <boost/assert.hpp>
@ -45,7 +46,8 @@ void BOOST_REGEX_CALL raw_storage::resize(size_type n)
// allocate and copy data:
register pointer ptr = static_cast<pointer>(::operator new(newsize));
BOOST_REGEX_NOEH_ASSERT(ptr)
std::memcpy(ptr, start, datasize);
if(start)
std::memcpy(ptr, start, datasize);
// get rid of old buffer:
::operator delete(start);