shangxinli commented on code in PR #1054:
URL: https://github.com/apache/iceberg-cpp/pull/1054#discussion_r4377827205
##########
src/iceberg/manifest/manifest_reader.cc:
##########
@@ -318,6 +323,7 @@ Result<std::vector<ManifestFile>>
ParseManifestList(ArrowSchema* arrow_schema,
ICEBERG_RETURN_UNEXPECTED(AssertViewTypeAndChildren(
&view, ArrowType::NANOARROW_TYPE_STRUCT, schema.fields().size(),
"manifest_list"));
+ ICEBERG_RETURN_UNEXPECTED(AssertChildrenLength(&view, "manifest_list"));
Review Comment:
ParseIntMapField and ParsePartitionFieldSummaryList have the same
struct-children-length gap this PR fixes elsewhere - AssertViewTypeAndChildren
on map_view and elem_view only checks type and child count, never length, so a
crafted key/value or partition-summary array shorter than its parent struct
would still pass FULL validation and then be read out of bounds.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]