From 2cb49b97dac25c8fe790e35c17adb77cbb827eff Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 14 Feb 2017 17:38:47 +0000 Subject: [PATCH] de-fuzz: Fix case 0 again. --- include/boost/regex/v4/basic_regex_parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index aae66aeb..ff0d4373 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -2596,7 +2596,7 @@ option_group_jump: re_alt* alt = static_cast(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt))); alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt); } - else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > static_cast(b)->alt.i) && (static_cast(b)->alt.i > 0) && this->getaddress(static_cast(b)->alt.i, b)->type == syntax_element_alt) + else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast(b)->alt.i + this->getoffset(b))) && (static_cast(b)->alt.i > 0) && this->getaddress(static_cast(b)->alt.i, b)->type == syntax_element_alt) { // Can't have seen more than one alternative: // Rewind to start of (? sequence: