HeenaBansal2009 commented on a change in pull request #1023:
URL: https://github.com/apache/orc/pull/1023#discussion_r791216879



##########
File path: c++/src/TypeImpl.cc
##########
@@ -413,6 +413,8 @@ namespace orc {
   std::unique_ptr<Type> convertType(const proto::Type& type,
                                     const proto::Footer& footer) {
     std::unique_ptr<Type> ret;
+    //check for corrupt footers before conversion
+    checkProtoTypes(footer);

Review comment:
       > Could you describe what happens after this PR? Previously, you filed 
the issue with `it crashed`.
   
   @dongjoon-hyun , Thanks for reviewing the PR. I can update as below : 
   
   // Validate the indices in the Protobuf message type tree especially for the 
Type_Kind_STRUCT when fieldnames are less than the subtypes_size() , so we 
won't crash when we convert the proto::Types to TypeImpls. 

##########
File path: c++/src/TypeImpl.cc
##########
@@ -413,6 +413,8 @@ namespace orc {
   std::unique_ptr<Type> convertType(const proto::Type& type,
                                     const proto::Footer& footer) {
     std::unique_ptr<Type> ret;
+    //check for corrupt footers before conversion
+    checkProtoTypes(footer);

Review comment:
       Done.




-- 
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]


Reply via email to