mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Add check for the hash response size during the processing
This commit is contained in:
1 parent
258c93d46f
commit
4afdc0fc78
2 files changed
+3
-3
No files matched your search
@@ -43,7 +43,7 @@ namespace gandiva {
|
||||
const void* message,
|
||||
size_t message_length,
|
||||
const EVP_MD *hash_type,
|
||||
int result_buf_size,
|
||||
uint32_t result_buf_size,
|
||||
int32_t *out_length) {
|
||||
EVP_MD_CTX *md_ctx = EVP_MD_CTX_new();
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace gandiva {
|
||||
}
|
||||
|
||||
// Create the temporary buffer used by the EVP to generate the hash
|
||||
int hash_digest_size = EVP_MD_size(hash_type);
|
||||
unsigned int hash_digest_size = EVP_MD_size(hash_type);
|
||||
auto* result = static_cast<unsigned char*>(OPENSSL_malloc(hash_digest_size));
|
||||
|
||||
if (result == nullptr) {
|
||||
|
||||
@@ -44,7 +44,7 @@ class GANDIVA_EXPORT HashUtils {
|
||||
const void *message,
|
||||
size_t message_length,
|
||||
const EVP_MD *hash_type,
|
||||
int result_buf_size,
|
||||
uint32_t result_buf_size,
|
||||
int32_t *out_length);
|
||||
|
||||
static void ErrorMessage(int64_t context_ptr, char const *err_msg);
|
||||
|
||||
Reference in new issue
Block a user