Skip to content

Commit 6f0d350

Browse files
technateNGlemire
authored andcommitted
Fix to issue simdjson#148. (simdjson#151)
* Issue simdjson#148 fix. * Test cases for issue simdjson#148.
1 parent 719dff1 commit 6f0d350

4 files changed

Lines changed: 9 additions & 0 deletions

File tree

jsonchecker/fail62.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"foo":"baa}

jsonchecker/fail63.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"f[

jsonchecker/fail64.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"

src/stage1_find_marks.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,12 @@ WARN_UNUSED
609609
quote_bits, prev_iter_ends_pseudo_pred);
610610
idx += 64;
611611
}
612+
613+
// is last string quote closed?
614+
if (prev_iter_inside_quote) {
615+
return false;
616+
}
617+
612618
// finally, flatten out the remaining structurals from the last iteration
613619
flatten_bits(base_ptr, base, idx, structurals);
614620

0 commit comments

Comments
 (0)