1 Star 0 Fork 53

冉召宇/third_party_libxml2_1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backport-encoding-Fix-error-code-in-asciiToUTF8.patch 809 Bytes
一键复制 编辑 原始数据 按行查看 历史
冉召宇 提交于 12个月前 . libxml2切openEuler7.0
From a6b9e55a9eb78e96f880afaf03ce8819bcd26a34 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Sun, 26 Mar 2023 15:42:02 +0200
Subject: [PATCH] encoding: Fix error code in asciiToUTF8
Use correct error code when invalid ASCII bytes are encountered.
Found by OSS-Fuzz.
Reference:https://github.com/GNOME/libxml2/commit/a6b9e55a9eb78e96f880afaf03ce8819bcd26a34
Conflict:NA
---
encoding.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/encoding.c b/encoding.c
index d43361a..9a7a611 100644
--- a/encoding.c
+++ b/encoding.c
@@ -193,7 +193,7 @@ asciiToUTF8(unsigned char* out, int *outlen,
} else {
*outlen = out - outstart;
*inlen = processed - base;
- return(-1);
+ return(-2);
}
processed = (const unsigned char*) in;
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ran-zhao-yu/third_party_libxml2_1.git
git@gitee.com:ran-zhao-yu/third_party_libxml2_1.git
ran-zhao-yu
third_party_libxml2_1
third_party_libxml2_1
master

搜索帮助