Skip to content

Commit 73e057a

Browse files
Update src/iceberg/avro/avro_schema_util.cc
Co-authored-by: Gang Wu <[email protected]>
1 parent 2de649b commit 73e057a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/iceberg/avro/avro_schema_util.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ Result<::avro::NodePtr> CreateRecordNodeWithFieldIds(const ::avro::NodePtr& orig
798798
}
799799

800800
for (size_t i = 0; i < original_node->leaves(); ++i) {
801+
if (i >= original_node->names()) {
802+
return InvalidSchema(...);
803+
}
801804
const std::string& field_name = original_node->nameAt(i);
802805
::avro::NodePtr field_node = original_node->leafAt(i);
803806

0 commit comments

Comments
 (0)