Projects
Mega:23.03
libyaml
_service:tar_scm:fix-heap-buffer-overflow-error...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:fix-heap-buffer-overflow-error-in-yaml-emitter-emit.patch of Package libyaml
From cbd860b8e62ec0dc85d4d76a9a8900a3db9c740c Mon Sep 17 00:00:00 2001 From: chenziyang <chenziyang4@huawei.com> Date: Tue, 8 Nov 2022 11:15:36 +0800 Subject: [PATCH] Fix heap buffer overflow error in yaml_emitter_emit_flow_sequence_item function --- src/emitter.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/emitter.c b/src/emitter.c index 609b28a..336bfd1 100644 --- a/src/emitter.c +++ b/src/emitter.c @@ -758,7 +758,13 @@ yaml_emitter_emit_flow_sequence_item(yaml_emitter_t *emitter, if (event->type == YAML_SEQUENCE_END_EVENT) { emitter->flow_level --; - emitter->indent = POP(emitter, emitter->indents); + if (!STACK_EMPTY(emitter, emitter->indents)) { + emitter->indent = POP(emitter, emitter->indents); + } + else { + emitter->indent = 0; // set to default + } + if (emitter->canonical && !first) { if (!yaml_emitter_write_indicator(emitter, ",", 0, 0, 0)) return 0; -- 2.21.0.windows.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2