Subject: [Boost-bugs] [Boost C++ Libraries] #13034: Infinite loop when counter overflows
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-05-16 10:56:53
#13034: Infinite loop when counter overflows
-------------------------------+-------------------------
Reporter: lukasz.czajczyk@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
Version: Boost 1.66.0 | Severity: Problem
Keywords: |
-------------------------------+-------------------------
Hi,
In function
bool perl_matcher<BidiIterator, Allocator,
traits>::match_dot_repeat_slow()
variable 'count' can overflow since it's defined as unsigned int and
rep->max is std::size_t initialized to numeric limits max.
while(count < rep->max)
{
pstate = psingle;
if(!match_wild())
break;
++count;
}
On Red Hat 6.7, 64 bit, unsigned int it 32 bit while size_t is 64 bit.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/13034> 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-05-16 11:00:53 UTC