Skip to content

Commit bfee058

Browse files
committed
bug
1 parent f56bafc commit bfee058

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cpp/src/arrow/json/chunker.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ class ParsingBoundaryFinder : public BoundaryFinder {
176176
break;
177177
}
178178
if (length == 0) {
179+
// Check if remaining block contains invalid content (not starting with { or [)
180+
const size_t start = ConsumeWhitespace(block);
181+
if (start < block.size() && block[start] != '{' && block[start] != '[') {
182+
return Status::Invalid("JSON parse error: Invalid value");
183+
}
179184
// found incomplete object or block is empty
180185
break;
181186
}

0 commit comments

Comments
 (0)