Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use explicit key mapping for alias keys #62

Merged
merged 2 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")