11 Star 1 Fork 8

src-openEuler/libyaml
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch 768 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 7015a5e99fecc195e36f2334b046b19abfc718c1 Mon Sep 17 00:00:00 2001
From: panxiaohe <panxh.life@foxmail.com>
Date: Mon, 18 Apr 2022 15:26:11 +0800
Subject: [PATCH] fix heap buffer overflow in
yaml_emitter_emit_flow_mapping_key
---
src/emitter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/emitter.c b/src/emitter.c
index 609b28a..a9f39ec 100644
--- a/src/emitter.c
+++ b/src/emitter.c
@@ -806,6 +806,8 @@ yaml_emitter_emit_flow_mapping_key(yaml_emitter_t *emitter,
if (event->type == YAML_MAPPING_END_EVENT)
{
+ if (STACK_EMPTY(emitter, emitter->indents))
+ return 0;
emitter->flow_level --;
emitter->indent = POP(emitter, emitter->indents);
if (emitter->canonical && !first) {
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/libyaml.git
git@gitee.com:src-openeuler/libyaml.git
src-openeuler
libyaml
libyaml
openEuler-22.03-LTS-SP3

搜索帮助