mirror of
https://github.com/simonask/libyaml-safer
synced 2024-11-22 19:33:03 +00:00
Fix heap buffer overflow in yaml_emitter_emit_flow_mapping_key
This commit is contained in:
parent
90b50bb321
commit
b1cc5567b2
1 changed files with 3 additions and 0 deletions
|
@ -722,6 +722,9 @@ unsafe fn yaml_emitter_emit_flow_mapping_key(
|
|||
*fresh18 += 1;
|
||||
}
|
||||
if (*event).type_ == YAML_MAPPING_END_EVENT {
|
||||
if STACK_EMPTY!((*emitter).indents) {
|
||||
return FAIL;
|
||||
}
|
||||
let fresh19 = addr_of_mut!((*emitter).flow_level);
|
||||
*fresh19 -= 1;
|
||||
(*emitter).indent = POP!((*emitter).indents);
|
||||
|
|
Loading…
Reference in a new issue