Mageia Bugzilla – Attachment 2522 Details for
Bug 6623
boost new security issue CVE-2012-2677
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
test_bug_6701-mga1.cpp
test_bug_6701-mga1.cpp (text/x-c++src), 702 bytes, created by
David Walser
on 2012-07-03 17:19:27 CEST
(
hide
)
Description:
test_bug_6701-mga1.cpp
Filename:
MIME Type:
Creator:
David Walser
Created:
2012-07-03 17:19:27 CEST
Size:
702 bytes
patch
obsolete
>/* Copyright (C) 2012 Ãtienne Dupuis >* >* Use, modification and distribution is subject to the >* Boost Software License, Version 1.0. (See accompanying >* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) >*/ > >// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701) > >#include <boost/pool/object_pool.hpp> >#include <boost/limits.hpp> >#include <boost/assert.hpp> > >int main() >{ > boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768); > > void *x = p.malloc(); > BOOST_ASSERT(!x); > > BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size()); > > void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768); > BOOST_ASSERT(!y); > > return 0; >}
/* Copyright (C) 2012 Ãtienne Dupuis * * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) */ // Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701) #include <boost/pool/object_pool.hpp> #include <boost/limits.hpp> #include <boost/assert.hpp> int main() { boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768); void *x = p.malloc(); BOOST_ASSERT(!x); BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size()); void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768); BOOST_ASSERT(!y); return 0; }
View Attachment As Raw
Actions:
View
Attachments on
bug 6623
:
2521
| 2522