Opened 11 years ago
Last modified 10 years ago
#5902 new Bugs
Division by zero when requesting null sized buffers
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | pool |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Change History (5)
comment:1 by , 11 years ago
Summary: | Division by zero when requesting null sized buffes → Division by zero when requesting null sized buffers |
---|
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:5 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
https://svn.boost.org/svn/boost/sandbox/pool at revision 79460 contains a solution for tickets #3789, #5902, #6561, #6610, #6701, #6718, #6865 and #6867. Related test cases are also present.
https://svn.boost.org/svn/boost/sandbox/pool at revision 79460 does not contain any other new features or modifications other than those related to the above tickets.
Boost.Pool currently has no maintainer and is thus orphaned.
Revision: 78310 Author: edupuis Date: mercredi 2 mai 2012 22:19:00 Message: Prevent division by zero when requesting null sized buffers. Fixes #5902.
Modified : /sandbox/pool/boost/pool/pool.hpp Added : /sandbox/pool/libs/pool/test/test_bug_5902.cpp