pitrou commented on code in PR #43195:
URL: https://github.com/apache/arrow/pull/43195#discussion_r1673901469


##########
cpp/src/parquet/metadata.cc:
##########
@@ -1559,11 +1559,11 @@ class 
ColumnChunkMetaDataBuilder::ColumnChunkMetaDataBuilderImpl {
 
         serializer.SerializeToBuffer(&column_chunk_->meta_data, 
&serialized_len,
                                      &serialized_data);
+        ::arrow::util::span<const uint8_t> 
serialized_data_span(serialized_data,
+                                                                
serialized_len);
 
-        std::vector<uint8_t> encrypted_data(encryptor->CiphertextSizeDelta() +
-                                            serialized_len);
-        unsigned encrypted_len =
-            encryptor->Encrypt(serialized_data, serialized_len, 
encrypted_data.data());
+        std::vector<uint8_t> 
encrypted_data(encryptor->CiphertextLength(serialized_len));
+        unsigned encrypted_len = encryptor->Encrypt(serialized_data_span, 
encrypted_data);

Review Comment:
   Should this be changed to `int` like above?



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