Subject: [boost] [mp_int] Patch for deallocate(NULL)
From: Nathan Kitchen (nathan.kitchen_at_[hidden])
Date: 2009-01-09 19:38:46
In the version of mp_math posted to the vault in Oct 2008 there are
several calls to std::allocator::deallocate where the argument pointer
can be NULL. This is not compliant with the C++ standard, which states
"p must not be null" (Table 6 in 20.1.5 in the Draft Standard that I
have access to).
Sure enough, when p is null, I get a segmentation fault (using GCC 3.2.3).
Attached is a patch with a fix.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk