Skip to content

Commit

Permalink
Merge pull request #62 from tdakkota/fix/explicit-key-before-alias
Browse files Browse the repository at this point in the history
fix: use explicit key mapping for alias keys
  • Loading branch information
ernado committed Apr 24, 2023
2 parents d6b7a40 + a73d140 commit ac9ecfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions emitterc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool {
switch emitter.events[emitter.events_head].typ {
case yaml_ALIAS_EVENT:
length += len(emitter.anchor_data.anchor)
return false
case yaml_SCALAR_EVENT:
if emitter.scalar_data.multiline {
return false
Expand Down
2 changes: 2 additions & 0 deletions testdata/fuzz/FuzzDecodeEncodeDecode/999e9f6055aa8567
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
go test fuzz v1
[]byte("0: &\ud7ff\n? *\ud7ff")

0 comments on commit ac9ecfe

Please sign in to comment.