| author | |
| committer | |
| log | 3744bd2004110f418e09f9e61ee195ba9c20dc5b |
| tree | a75b4d5bdd95a6994f70318b3e0bf90bf0ccf8f4 |
| parent | e145a883400796f2338f80c102f739fa8589d14a |
| signature |
3 files changed, 34 insertions(+), 1 deletions(-)
fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97 created+31| ... | ... | @@ -0,0 +1,31 @@ |
| 1 | id: g982zq6e8wsvnmduerpbf8787hu85brugmngn8wf | |
| 2 | name: yaml | |
| 3 | main: yaml.zig | |
| 4 | license: MIT | |
| 5 | description: " Yaml parser built on top of libyaml | |
| 6 | dependencies: | |
| 7 | - 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 | ||
| 30 | root_dependencies: | |
| 31 | - src: git https://github.com/nektro/zig-expect |
test.zig+1| ... | ... | @@ -21,6 +21,7 @@ fn fuzzCase(embedfile_content: []const u8) void { |
| 21 | 21 | // zig fmt: off |
| 22 | 22 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:2049,execs:911,op:quick,pos:263")); } |
| 23 | 23 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:6342,execs:4701,op:arith8,pos:55,val:+3")); } |
| 24 | test { fuzzCase(@embedFile("./fuzz/crashes/id:000000,sig:06,src:000000,time:1310,execs:717,op:quick,pos:97")); } | |
| 24 | 25 | // zig fmt: on |
| 25 | 26 | |
| 26 | 27 | fn parseTest(comptime basename: [:0]const u8) !void { |
yaml.zig+2-1| ... | ... | @@ -268,7 +268,7 @@ pub const Parser = struct { |
| 268 | 268 | |
| 269 | 269 | pub const Error = |
| 270 | 270 | std.mem.Allocator.Error || |
| 271 | error{ YamlUnexpectedToken, YamlEndOfStream }; | |
| 271 | error{ YamlUnexpectedToken, YamlEndOfStream, YamlInvalidMultilineString }; | |
| 272 | 272 | |
| 273 | 273 | fn parse_item(p: *Parser, start: ?Token) Error!Item { |
| 274 | 274 | const tok = start orelse try p.next(); |
| ... | ... | @@ -376,6 +376,7 @@ fn get_event_string(event: Token, p: *const Parser) ![:0]u8 { |
| 376 | 376 | const lines = p.lines; |
| 377 | 377 | if (sm.line != em.line) { |
| 378 | 378 | const starter = lines[sm.line][sm.column..]; |
| 379 | if (starter.len > 1 and starter[0] == '"') return error.YamlInvalidMultilineString; | |
| 379 | 380 | std.debug.assert(starter.len == 1); |
| 380 | 381 | switch (starter[0]) { |
| 381 | 382 | '|' => { |