From 403ef471bccc587f5ea037bf5fa4a8edbeec91de Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 10 Aug 2024 17:40:19 +0000 Subject: automatic import of libyaml --- ...ffer-overflow-in-yaml_emitter_emit_flow_m.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch (limited to 'fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch') diff --git a/fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch b/fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch new file mode 100644 index 0000000..957a0cf --- /dev/null +++ b/fix-heap-buffer-overflow-in-yaml_emitter_emit_flow_m.patch @@ -0,0 +1,26 @@ +From 7015a5e99fecc195e36f2334b046b19abfc718c1 Mon Sep 17 00:00:00 2001 +From: panxiaohe +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 + -- cgit v1.2.3