Opened 5 years ago

Closed 5 years ago

#13034 closed Bugs (fixed)

Infinite loop when counter overflows

Reported by: lukasz.czajczyk@… Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.66.0 Severity: Problem
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by John Maddock, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.