mapleFU commented on code in PR #43222:
URL: https://github.com/apache/arrow/pull/43222#discussion_r1674183977


##########
cpp/src/parquet/metadata.cc:
##########
@@ -649,9 +649,12 @@ class FileMetaData::FileMetaDataImpl {
     std::string key = file_decryptor_->GetFooterKey();
     std::string aad = encryption::CreateFooterAad(file_decryptor_->file_aad());
 
-    auto aes_encryptor = encryption::AesEncryptor::Make(
-        file_decryptor_->algorithm(), static_cast<int>(key.size()), true,
-        false /*write_length*/, nullptr);
+    auto aes_encryptor = 
encryption::AesEncryptor::Make(file_decryptor_->algorithm(),
+                                                        
static_cast<int>(key.size()),
+                                                        true, false 
/*write_length*/);
+    if (ARROW_PREDICT_FALSE(aes_encryptor == nullptr)) {
+      throw ParquetException("Could not create AES encryptor for signature 
verification");

Review Comment:
   @adamreeve @wgtmac I'm not so familiar with logic here but 
`AesEncryptor::Make` might return nullptr if aes not enable, so should we add 
this check?



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