Commits


William Butler authored and Yibo Cai committed 6bbe8d66199
ARROW-14109: [C++] Fix segfault when parsing JSON with duplicate keys. When reading a JSON object with duplicate keys, Arrow can crash if the duplicate key was not in schema. In this case, the absent_fields_stack_ will not have an index to represent the duplicated key. When we encounter the duplicated key for a second time, field_index_ will be non-negative and greater than the size of absent_fields_stack_, thus triggering a crash when we attempt to read from absent_fields_stack_. Closes #11222 from tachyonwill/json_duplicate Authored-by: William Butler <wab@google.com> Signed-off-by: Yibo Cai <yibo.cai@arm.com>