forked from boostorg/regex
fix overflow bug when attempting to access match results
This commit is contained in:
@ -227,6 +227,10 @@ public:
|
||||
{
|
||||
if(m_is_singular && m_subs.empty())
|
||||
raise_logic_error();
|
||||
|
||||
if (sub >= INT_MAX - 2 )
|
||||
return m_null;
|
||||
|
||||
sub += 2;
|
||||
if(sub < (int)m_subs.size() && (sub >= 0))
|
||||
{
|
||||
|
@ -19,6 +19,8 @@
|
||||
#ifndef BOOST_REGEX_SYNTAX_TYPE_HPP
|
||||
#define BOOST_REGEX_SYNTAX_TYPE_HPP
|
||||
|
||||
#include <boost/regex/config.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace regex_constants{
|
||||
|
||||
|
Reference in New Issue
Block a user