Boost C++ Libraries: Ticket #13034: Infinite loop when counter overflows https://svn.boost.org/trac10/ticket/13034 <p> Hi, </p> <p> In function bool perl_matcher&lt;<a class="missing wiki">BidiIterator</a>, Allocator, traits&gt;::match_dot_repeat_slow() </p> <p> variable 'count' can overflow since it's defined as unsigned int and rep-&gt;max is std::size_t initialized to numeric limits max. </p> <blockquote> <p> while(count &lt; rep-&gt;max) { </p> <blockquote> <p> pstate = psingle; if(!match_wild()) </p> <blockquote> <p> break; </p> </blockquote> <p> ++count; </p> </blockquote> <p> } </p> </blockquote> <p> On Red Hat 6.7, 64 bit, unsigned int it 32 bit while size_t is 64 bit. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13034 Trac 1.4.3 John Maddock Mon, 31 Jul 2017 17:54:24 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13034#comment:1 https://svn.boost.org/trac10/ticket/13034#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/regex/commit/d97bcfb5dd6b4418040b776f33a9342a4b2b6b75"><span class="icon">​</span>https://github.com/boostorg/regex/commit/d97bcfb5dd6b4418040b776f33a9342a4b2b6b75</a> </p> <p> Thanks! </p> Ticket