mapleFU commented on code in PR #43222:
URL: https://github.com/apache/arrow/pull/43222#discussion_r1674305620
##########
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:
exception is better than failed and core dump 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]