代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libical 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 3eacf85ec9dd638c2023c89c2a6cdf61107fc617 Mon Sep 17 00:00:00 2001
From: Kent Sutherland <git@ksuther.com>
Date: Fri, 14 Jun 2019 15:21:59 -0500
Subject: [PATCH] Fix timeout found by fuzzer (oss-fuzz issue 14881) strspn is
really slow compared to doing direct comparisons
---
src/libical/icalparser.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c
index fa92495..0530a4b 100644
--- a/src/libical/icalparser.c
+++ b/src/libical/icalparser.c
@@ -221,21 +221,29 @@ static void parser_decode_param_value(char *value)
char *in, *out;
for (in = out = value; *in; in++, out++) {
- if (*in == '^' && strspn(in+1, "n^'")) {
- switch (*++in) {
- case 'n':
+ int found_escaped_char = 0;
+
+ if(*in == '^'){
+ switch (*(in + 1)) {
+ case 'n':
*out = '\n';
+ found_escaped_char = 1;
break;
-
case '^':
*out = '^';
+ found_escaped_char = 1;
break;
case '\'':
*out = '"';
+ found_escaped_char = 1;
break;
}
- } else {
+ }
+
+ if(found_escaped_char) {
+ ++in;
+ } else {
*out = *in;
}
}
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。