[Boost-bugs] [Boost C++ Libraries] #5902: Division by zero when requesting null sized buffes

Subject: [Boost-bugs] [Boost C++ Libraries] #5902: Division by zero when requesting null sized buffes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-09-16 10:06:40


#5902: Division by zero when requesting null sized buffes
-------------------------------------------------+--------------------------
 Reporter: Étienne Dupuis <e.dupuis@…> | Owner: cnewbold
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: pool
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+--------------------------
 The following code yields a division by zero in pool::malloc_need_resize()
 :

 {{{
         boost::pool<> p(0, 1, 1);
         p.malloc();
 }}}

 The code above requests at most one buffer of size zero. The expected
 behavior would be one of (i) malloc fails, (ii) malloc returns a null
 sized buffer.

 Regards

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/5902>
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:07 UTC