authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-31 18:13:34 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-31 18:13:34 -07:00
log5d1f855a2c560a2fc10a05ce9cb59e0865e8bff4
tree88426053fe8d34ef257036476627282aa06b9914
parent3744bd2004110f418e09f9e61ee195ba9c20dc5b
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fix another case


3 files changed, 33 insertions(+), 2 deletions(-)

fuzz/crashes/id:000000,sig:06,src:000000,time:1399,execs:755,op:quick,pos:149 created+31
...@@ -0,0 +1,31 @@
1id: g982zq6e8wsvnmduerpbf8787hu85brugmngn8wf
2name: yaml
3main: yaml.zig
4license: MIT
5description: A Yaml parser built on top of libyaml
6dependencies:
7a - src: git https://github.com/yaml/libyaml tag-0.2.5
8 id: 8mdbh0zuneb0i3hs5jby5je0heem1i6yxusl7c8y8qx68hqc
9 license: MIT
10 c_include_dirs:
11 - include
12 c_source_flags:
13 - -DYAML_VERSION_MAJOR=0
14 - -DYAML_VERSION_MINOR=2
15 - -DYAML_VERSION_PATCH=5
16 - -DYAML_VERSION_STRING="0.2.5"
17 - -DYAML_DECLARE_STATIC=1
18 c_source_files:
19 - src/api.c
20 - src/dumper.c
21 - src/emitter.c
22 - src/loader.c
23 - src/parser.c
24 - src/reader.c
25 - src/scanner.c
26 - src/writer.c
27
28 - src: git https://github.com/nektro/zig-extras
29
30root_dependencies:
31 - src: git https://github.com/nektro/zig-expect
test.zig+1
...@@ -22,6 +22,7 @@ fn fuzzCase(embedfile_content: []const u8) void {...@@ -22,6 +22,7 @@ fn fuzzCase(embedfile_content: []const u8) void {
22test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:2049,execs:911,op:quick,pos:263")); }22test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:2049,execs:911,op:quick,pos:263")); }
23test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:6342,execs:4701,op:arith8,pos:55,val:+3")); }23test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:6342,execs:4701,op:arith8,pos:55,val:+3")); }
24test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97")); }24test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97")); }
25test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1399,execs:755,op:quick,pos:149")); }
25// zig fmt: on26// zig fmt: on
2627
27fn parseTest(comptime basename: [:0]const u8) !void {28fn parseTest(comptime basename: [:0]const u8) !void {
yaml.zig+1-2
...@@ -376,8 +376,7 @@ fn get_event_string(event: Token, p: *const Parser) ![:0]u8 {...@@ -376,8 +376,7 @@ fn get_event_string(event: Token, p: *const Parser) ![:0]u8 {
376 const lines = p.lines;376 const lines = p.lines;
377 if (sm.line != em.line) {377 if (sm.line != em.line) {
378 const starter = lines[sm.line][sm.column..];378 const starter = lines[sm.line][sm.column..];
379 if (starter.len > 1 and starter[0] == '"') return error.YamlInvalidMultilineString;379 if (starter.len != 1) return error.YamlInvalidMultilineString;
380 std.debug.assert(starter.len == 1);
381 switch (starter[0]) {380 switch (starter[0]) {
382 '|' => {381 '|' => {
383 var list = std.ArrayList(u8).init(p.alloc);382 var list = std.ArrayList(u8).init(p.alloc);