HuaHuaY commented on code in PR #51239:
URL: https://github.com/apache/arrow/pull/51239#discussion_r3964299517
##########
cpp/src/parquet/properties.h:
##########
@@ -121,6 +125,15 @@ class PARQUET_EXPORT ReaderProperties {
thrift_container_size_limit_ = size;
}
+ /// \brief Return the schema nesting depth limit.
+ ///
+ /// This limit helps prevent denial of service through excessive recursion
+ /// (stack overflow) when reconstructing the Parquet schema from the file
metadata.
+ /// The default value is conservative enough for most use cases.
+ int32_t schema_depth_limit() const { return schema_depth_limit_; }
+ /// Set the schema nesting depth limit.
+ void set_schema_depth_limit(int32_t size) { schema_depth_limit_ = size; }
Review Comment:
Do we have any conventions regarding the use of `int32_t`? Could we use
`uint32_t` here?
--
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]