代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/boost 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 91107fe78a290a7d25a042fec09ea89f14f480d9 Mon Sep 17 00:00:00 2001
From: xuhuijie <xuhuijie2@huawei.com>
Date: Wed, 16 Jun 2021 15:47:22 +0800
Subject: [PATCH] regex: fix dead loop in parse_repea
There is a bug in parse_repeat(), after deal with comment the
contin value will be always true. So we enter a dead loop. To deal with this,
we assign contin to false each time we enter the loop.
Testcase: boost::regex(std::string("1?+(?#)1"))
Signed-off-by: Xu Huijie <xuhuijie2@huawei.com>
---
boost/regex/v4/basic_regex_parser.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp
index 6c7065f05..de22f7000 100644
--- a/boost/regex/v4/basic_regex_parser.hpp
+++ b/boost/regex/v4/basic_regex_parser.hpp
@@ -1080,9 +1080,10 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
// Check for illegal following quantifier, we have to do this here, because
// the extra states we insert below circumvents our usual error checking :-(
//
- bool contin = false;
+ bool contin;
do
{
+ contin = false;
if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
{
// whitespace skip:
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。