From 94a3bcde7fb0d94f20de10e86f7c9f31fd1920ac Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Thu, 16 Apr 2026 23:18:04 +0000 Subject: [PATCH 1/8] gh-49752: Fix potential buffer overrun in gandiva ssl function. --- cpp/src/gandiva/hash_utils.cc | 12 +++++++----- cpp/src/gandiva/hash_utils.h | 1 - cpp/src/gandiva/hash_utils_test.cc | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index ad856e1e238c..28334caae746 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -63,7 +63,6 @@ const char* gdv_md5_hash(int64_t context, const void* message, size_t message_le /// It uses the EVP API in the OpenSSL library to generate /// the hash. The type of the hash is defined by the /// \b hash_type \b parameter. -GANDIVA_EXPORT const char* gdv_hash_using_openssl(int64_t context, const void* message, size_t message_length, const EVP_MD* hash_type, uint32_t result_buf_size, int32_t* out_length) { @@ -102,7 +101,7 @@ const char* gdv_hash_using_openssl(int64_t context, const void* message, unsigned int result_length; EVP_DigestFinal_ex(md_ctx, result, &result_length); - if (result_length != hash_digest_size && result_buf_size != (2 * hash_digest_size)) { + if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { gdv_fn_context_set_error_msg(context, "Could not obtain the hash for the defined value"); EVP_MD_CTX_free(md_ctx); @@ -112,8 +111,10 @@ const char* gdv_hash_using_openssl(int64_t context, const void* message, return ""; } - auto result_buffer = - reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size)); + // Allocate one extra byte beyond result_buf_size so that the null terminator + // written by the final snprintf call does not land past the end of the buffer. + auto result_buffer = reinterpret_cast( + gdv_fn_context_arena_malloc(context, result_buf_size + 1)); if (result_buffer == nullptr) { gdv_fn_context_set_error_msg(context, @@ -132,7 +133,8 @@ const char* gdv_hash_using_openssl(int64_t context, const void* message, unsigned char hex_number = result[j]; result_buff_index += - snprintf(result_buffer + result_buff_index, result_buf_size, "%02x", hex_number); + snprintf(result_buffer + result_buff_index, + result_buf_size - result_buff_index + 1, "%02x", hex_number); } // Free the resources used by the EVP to avoid memory leaks diff --git a/cpp/src/gandiva/hash_utils.h b/cpp/src/gandiva/hash_utils.h index 06e988496b14..83774677c0be 100644 --- a/cpp/src/gandiva/hash_utils.h +++ b/cpp/src/gandiva/hash_utils.h @@ -37,7 +37,6 @@ GANDIVA_EXPORT const char* gdv_sha1_hash(int64_t context, const void* message, size_t message_length, int32_t* out_length); -GANDIVA_EXPORT const char* gdv_hash_using_openssl(int64_t context, const void* message, size_t message_length, const EVP_MD* hash_type, uint32_t result_buf_size, int32_t* out_length); diff --git a/cpp/src/gandiva/hash_utils_test.cc b/cpp/src/gandiva/hash_utils_test.cc index 65385023324a..d90f695385d4 100644 --- a/cpp/src/gandiva/hash_utils_test.cc +++ b/cpp/src/gandiva/hash_utils_test.cc @@ -20,6 +20,7 @@ #include "gandiva/execution_context.h" #include "gandiva/hash_utils.h" +#include "openssl/evp.h" TEST(TestShaHashUtils, TestSha1Numeric) { gandiva::ExecutionContext ctx; @@ -316,3 +317,22 @@ TEST(TestShaHashUtils, TestMD5Varlen) { EXPECT_EQ(md5_2_as_str.size(), md5_size); EXPECT_EQ(md5_2_as_str, expected_second_result); } + +// Verify that gdv_hash_using_openssl() reports an error when result_buf_size does not +// equal 2 * hash_digest_size (tests the || fix from GH-49752). +TEST(TestShaHashUtils, TestHashUsingOpenSSLInvalidBufSize) { + gandiva::ExecutionContext ctx; + auto ctx_ptr = reinterpret_cast(&ctx); + + std::string msg = "hello"; + int32_t out_length = -1; + + // SHA-256 digest is 32 bytes, so result_buf_size must be 64. Pass 63 to trigger + // the error path that was previously guarded by && instead of ||. + const char* result = gandiva::gdv_hash_using_openssl( + ctx_ptr, msg.c_str(), msg.size(), EVP_sha256(), /*result_buf_size=*/63, &out_length); + + EXPECT_TRUE(ctx.has_error()); + EXPECT_EQ(out_length, 0); + EXPECT_STREQ(result, ""); +} From 158e94d56f16c44495fcad492047745698ff8f03 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Fri, 17 Apr 2026 17:23:17 +0000 Subject: [PATCH 2/8] Remove test which was not very valuable and caused linking problems on some OSs --- cpp/src/gandiva/hash_utils_test.cc | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/cpp/src/gandiva/hash_utils_test.cc b/cpp/src/gandiva/hash_utils_test.cc index d90f695385d4..64bb490b7fb6 100644 --- a/cpp/src/gandiva/hash_utils_test.cc +++ b/cpp/src/gandiva/hash_utils_test.cc @@ -317,22 +317,3 @@ TEST(TestShaHashUtils, TestMD5Varlen) { EXPECT_EQ(md5_2_as_str.size(), md5_size); EXPECT_EQ(md5_2_as_str, expected_second_result); } - -// Verify that gdv_hash_using_openssl() reports an error when result_buf_size does not -// equal 2 * hash_digest_size (tests the || fix from GH-49752). -TEST(TestShaHashUtils, TestHashUsingOpenSSLInvalidBufSize) { - gandiva::ExecutionContext ctx; - auto ctx_ptr = reinterpret_cast(&ctx); - - std::string msg = "hello"; - int32_t out_length = -1; - - // SHA-256 digest is 32 bytes, so result_buf_size must be 64. Pass 63 to trigger - // the error path that was previously guarded by && instead of ||. - const char* result = gandiva::gdv_hash_using_openssl( - ctx_ptr, msg.c_str(), msg.size(), EVP_sha256(), /*result_buf_size=*/63, &out_length); - - EXPECT_TRUE(ctx.has_error()); - EXPECT_EQ(out_length, 0); - EXPECT_STREQ(result, ""); -} From 3e5bc70cfdd3b98d81600bc39e49017162a95c0c Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Fri, 17 Apr 2026 18:20:14 +0000 Subject: [PATCH 3/8] fix lint --- cpp/src/gandiva/hash_utils.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index 28334caae746..968e14199e72 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -113,8 +113,8 @@ const char* gdv_hash_using_openssl(int64_t context, const void* message, // Allocate one extra byte beyond result_buf_size so that the null terminator // written by the final snprintf call does not land past the end of the buffer. - auto result_buffer = reinterpret_cast( - gdv_fn_context_arena_malloc(context, result_buf_size + 1)); + auto result_buffer = + reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size + 1)); if (result_buffer == nullptr) { gdv_fn_context_set_error_msg(context, From 87c6b02943e2bb9027a1664d12f387502206f5a6 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Sat, 18 Apr 2026 21:29:09 +0000 Subject: [PATCH 4/8] Cleanup --- cpp/src/gandiva/hash_utils.cc | 177 +++++++++++++++-------------- cpp/src/gandiva/hash_utils.h | 4 - cpp/src/gandiva/hash_utils_test.cc | 1 - 3 files changed, 90 insertions(+), 92 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index 968e14199e72..576929f0173b 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -21,6 +21,96 @@ #include "gandiva/gdv_function_stubs.h" #include "openssl/evp.h" + +namespace { +/// \brief Hashes a generic message using SHA algorithm. +/// +/// It uses the EVP API in the OpenSSL library to generate +/// the hash. The type of the hash is defined by the +/// \b hash_type \b parameter. + static const char* gdv_hash_using_openssl(int64_t context, const void* message, + size_t message_length, const EVP_MD* hash_type, + uint32_t result_buf_size, int32_t* out_length) { + EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); + + if (md_ctx == nullptr) { + gdv_fn_context_set_error_msg(context, + "Could not create the context for SHA processing."); + *out_length = 0; + return ""; + } + + int evp_success_status = 1; + + if (EVP_DigestInit_ex(md_ctx, hash_type, nullptr) != evp_success_status || + EVP_DigestUpdate(md_ctx, message, message_length) != evp_success_status) { + gdv_fn_context_set_error_msg(context, + "Could not obtain the hash for the defined value."); + EVP_MD_CTX_free(md_ctx); + + *out_length = 0; + return ""; + } + + // Create the temporary buffer used by the EVP to generate the hash + unsigned int hash_digest_size = EVP_MD_size(hash_type); + auto* result = static_cast(OPENSSL_malloc(hash_digest_size)); + + if (result == nullptr) { + gdv_fn_context_set_error_msg(context, "Could not allocate memory for SHA processing"); + EVP_MD_CTX_free(md_ctx); + *out_length = 0; + return ""; + } + + unsigned int result_length; + EVP_DigestFinal_ex(md_ctx, result, &result_length); + + if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { + gdv_fn_context_set_error_msg(context, + "Could not obtain the hash for the defined value"); + EVP_MD_CTX_free(md_ctx); + OPENSSL_free(result); + + *out_length = 0; + return ""; + } + + // Allocate one extra byte beyond result_buf_size so that the null terminator + // written by the final snprintf call does not land past the end of the buffer. + auto result_buffer = + reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size + 1)); + + if (result_buffer == nullptr) { + gdv_fn_context_set_error_msg(context, + "Could not allocate memory for the result buffer"); + // Free the resources used by the EVP + EVP_MD_CTX_free(md_ctx); + OPENSSL_free(result); + + *out_length = 0; + return ""; + } + + unsigned int result_buff_index = 0; + for (unsigned int j = 0; j < result_length; j++) { + DCHECK(result_buff_index >= 0 && result_buff_index < result_buf_size); + + unsigned char hex_number = result[j]; + result_buff_index += + snprintf(result_buffer + result_buff_index, + result_buf_size - result_buff_index + 1, "%02x", hex_number); + } + + // Free the resources used by the EVP to avoid memory leaks + EVP_MD_CTX_free(md_ctx); + OPENSSL_free(result); + + *out_length = result_buf_size; + return result_buffer; + } +} + namespace gandiva { /// Hashes a generic message using the SHA512 algorithm @@ -58,93 +148,6 @@ const char* gdv_md5_hash(int64_t context, const void* message, size_t message_le md5_result_length, out_length); } -/// \brief Hashes a generic message using SHA algorithm. -/// -/// It uses the EVP API in the OpenSSL library to generate -/// the hash. The type of the hash is defined by the -/// \b hash_type \b parameter. -const char* gdv_hash_using_openssl(int64_t context, const void* message, - size_t message_length, const EVP_MD* hash_type, - uint32_t result_buf_size, int32_t* out_length) { - EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); - - if (md_ctx == nullptr) { - gdv_fn_context_set_error_msg(context, - "Could not create the context for SHA processing."); - *out_length = 0; - return ""; - } - - int evp_success_status = 1; - - if (EVP_DigestInit_ex(md_ctx, hash_type, nullptr) != evp_success_status || - EVP_DigestUpdate(md_ctx, message, message_length) != evp_success_status) { - gdv_fn_context_set_error_msg(context, - "Could not obtain the hash for the defined value."); - EVP_MD_CTX_free(md_ctx); - - *out_length = 0; - return ""; - } - - // Create the temporary buffer used by the EVP to generate the hash - unsigned int hash_digest_size = EVP_MD_size(hash_type); - auto* result = static_cast(OPENSSL_malloc(hash_digest_size)); - - if (result == nullptr) { - gdv_fn_context_set_error_msg(context, "Could not allocate memory for SHA processing"); - EVP_MD_CTX_free(md_ctx); - *out_length = 0; - return ""; - } - - unsigned int result_length; - EVP_DigestFinal_ex(md_ctx, result, &result_length); - - if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { - gdv_fn_context_set_error_msg(context, - "Could not obtain the hash for the defined value"); - EVP_MD_CTX_free(md_ctx); - OPENSSL_free(result); - - *out_length = 0; - return ""; - } - - // Allocate one extra byte beyond result_buf_size so that the null terminator - // written by the final snprintf call does not land past the end of the buffer. - auto result_buffer = - reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size + 1)); - - if (result_buffer == nullptr) { - gdv_fn_context_set_error_msg(context, - "Could not allocate memory for the result buffer"); - // Free the resources used by the EVP - EVP_MD_CTX_free(md_ctx); - OPENSSL_free(result); - - *out_length = 0; - return ""; - } - - unsigned int result_buff_index = 0; - for (unsigned int j = 0; j < result_length; j++) { - DCHECK(result_buff_index >= 0 && result_buff_index < result_buf_size); - - unsigned char hex_number = result[j]; - result_buff_index += - snprintf(result_buffer + result_buff_index, - result_buf_size - result_buff_index + 1, "%02x", hex_number); - } - - // Free the resources used by the EVP to avoid memory leaks - EVP_MD_CTX_free(md_ctx); - OPENSSL_free(result); - - *out_length = result_buf_size; - return result_buffer; -} - GANDIVA_EXPORT uint64_t gdv_double_to_long(double value) { uint64_t result; diff --git a/cpp/src/gandiva/hash_utils.h b/cpp/src/gandiva/hash_utils.h index 83774677c0be..e523e3d910d5 100644 --- a/cpp/src/gandiva/hash_utils.h +++ b/cpp/src/gandiva/hash_utils.h @@ -37,10 +37,6 @@ GANDIVA_EXPORT const char* gdv_sha1_hash(int64_t context, const void* message, size_t message_length, int32_t* out_length); -const char* gdv_hash_using_openssl(int64_t context, const void* message, - size_t message_length, const EVP_MD* hash_type, - uint32_t result_buf_size, int32_t* out_length); - GANDIVA_EXPORT const char* gdv_md5_hash(int64_t context, const void* message, size_t message_length, int32_t* out_length); diff --git a/cpp/src/gandiva/hash_utils_test.cc b/cpp/src/gandiva/hash_utils_test.cc index 64bb490b7fb6..65385023324a 100644 --- a/cpp/src/gandiva/hash_utils_test.cc +++ b/cpp/src/gandiva/hash_utils_test.cc @@ -20,7 +20,6 @@ #include "gandiva/execution_context.h" #include "gandiva/hash_utils.h" -#include "openssl/evp.h" TEST(TestShaHashUtils, TestSha1Numeric) { gandiva::ExecutionContext ctx; From a52213d78af497bf90062b8f0f0b4ef43dc7d1b9 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Mon, 20 Apr 2026 15:45:56 +0000 Subject: [PATCH 5/8] lint --- cpp/src/gandiva/hash_utils.cc | 155 +++++++++++++++++----------------- 1 file changed, 77 insertions(+), 78 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index 576929f0173b..13063716cbcb 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -21,95 +21,94 @@ #include "gandiva/gdv_function_stubs.h" #include "openssl/evp.h" - namespace { /// \brief Hashes a generic message using SHA algorithm. /// /// It uses the EVP API in the OpenSSL library to generate /// the hash. The type of the hash is defined by the /// \b hash_type \b parameter. - static const char* gdv_hash_using_openssl(int64_t context, const void* message, - size_t message_length, const EVP_MD* hash_type, - uint32_t result_buf_size, int32_t* out_length) { - EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); - - if (md_ctx == nullptr) { - gdv_fn_context_set_error_msg(context, - "Could not create the context for SHA processing."); - *out_length = 0; - return ""; - } - - int evp_success_status = 1; - - if (EVP_DigestInit_ex(md_ctx, hash_type, nullptr) != evp_success_status || - EVP_DigestUpdate(md_ctx, message, message_length) != evp_success_status) { - gdv_fn_context_set_error_msg(context, - "Could not obtain the hash for the defined value."); - EVP_MD_CTX_free(md_ctx); - - *out_length = 0; - return ""; - } - - // Create the temporary buffer used by the EVP to generate the hash - unsigned int hash_digest_size = EVP_MD_size(hash_type); - auto* result = static_cast(OPENSSL_malloc(hash_digest_size)); - - if (result == nullptr) { - gdv_fn_context_set_error_msg(context, "Could not allocate memory for SHA processing"); - EVP_MD_CTX_free(md_ctx); - *out_length = 0; - return ""; - } - - unsigned int result_length; - EVP_DigestFinal_ex(md_ctx, result, &result_length); - - if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { - gdv_fn_context_set_error_msg(context, - "Could not obtain the hash for the defined value"); - EVP_MD_CTX_free(md_ctx); - OPENSSL_free(result); - - *out_length = 0; - return ""; - } - - // Allocate one extra byte beyond result_buf_size so that the null terminator - // written by the final snprintf call does not land past the end of the buffer. - auto result_buffer = - reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size + 1)); - - if (result_buffer == nullptr) { - gdv_fn_context_set_error_msg(context, - "Could not allocate memory for the result buffer"); - // Free the resources used by the EVP - EVP_MD_CTX_free(md_ctx); - OPENSSL_free(result); - - *out_length = 0; - return ""; - } - - unsigned int result_buff_index = 0; - for (unsigned int j = 0; j < result_length; j++) { - DCHECK(result_buff_index >= 0 && result_buff_index < result_buf_size); - - unsigned char hex_number = result[j]; - result_buff_index += - snprintf(result_buffer + result_buff_index, - result_buf_size - result_buff_index + 1, "%02x", hex_number); - } - - // Free the resources used by the EVP to avoid memory leaks +static const char* gdv_hash_using_openssl(int64_t context, const void* message, + size_t message_length, const EVP_MD* hash_type, + uint32_t result_buf_size, int32_t* out_length) { + EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); + + if (md_ctx == nullptr) { + gdv_fn_context_set_error_msg(context, + "Could not create the context for SHA processing."); + *out_length = 0; + return ""; + } + + int evp_success_status = 1; + + if (EVP_DigestInit_ex(md_ctx, hash_type, nullptr) != evp_success_status || + EVP_DigestUpdate(md_ctx, message, message_length) != evp_success_status) { + gdv_fn_context_set_error_msg(context, + "Could not obtain the hash for the defined value."); + EVP_MD_CTX_free(md_ctx); + + *out_length = 0; + return ""; + } + + // Create the temporary buffer used by the EVP to generate the hash + unsigned int hash_digest_size = EVP_MD_size(hash_type); + auto* result = static_cast(OPENSSL_malloc(hash_digest_size)); + + if (result == nullptr) { + gdv_fn_context_set_error_msg(context, "Could not allocate memory for SHA processing"); + EVP_MD_CTX_free(md_ctx); + *out_length = 0; + return ""; + } + + unsigned int result_length; + EVP_DigestFinal_ex(md_ctx, result, &result_length); + + if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { + gdv_fn_context_set_error_msg(context, + "Could not obtain the hash for the defined value"); + EVP_MD_CTX_free(md_ctx); + OPENSSL_free(result); + + *out_length = 0; + return ""; + } + + // Allocate one extra byte beyond result_buf_size so that the null terminator + // written by the final snprintf call does not land past the end of the buffer. + auto result_buffer = + reinterpret_cast(gdv_fn_context_arena_malloc(context, result_buf_size + 1)); + + if (result_buffer == nullptr) { + gdv_fn_context_set_error_msg(context, + "Could not allocate memory for the result buffer"); + // Free the resources used by the EVP EVP_MD_CTX_free(md_ctx); OPENSSL_free(result); - *out_length = result_buf_size; - return result_buffer; + *out_length = 0; + return ""; + } + + unsigned int result_buff_index = 0; + for (unsigned int j = 0; j < result_length; j++) { + DCHECK(result_buff_index >= 0 && result_buff_index < result_buf_size); + + unsigned char hex_number = result[j]; + result_buff_index += + snprintf(result_buffer + result_buff_index, + result_buf_size - result_buff_index + 1, "%02x", hex_number); } + + // Free the resources used by the EVP to avoid memory leaks + EVP_MD_CTX_free(md_ctx); + OPENSSL_free(result); + + *out_length = result_buf_size; + return result_buffer; } +} // namespace namespace gandiva { From a6ababad6a762ef2cc00df312055b94580ea1d09 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Mon, 20 Apr 2026 17:09:51 +0000 Subject: [PATCH 6/8] Add check for EVP_DigestFinal_ex return value in hash function. --- cpp/src/gandiva/hash_utils.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index 13063716cbcb..ed1731d7277a 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -63,9 +63,10 @@ static const char* gdv_hash_using_openssl(int64_t context, const void* message, } unsigned int result_length; - EVP_DigestFinal_ex(md_ctx, result, &result_length); + int evp_result = EVP_DigestFinal_ex(md_ctx, result, &result_length); - if (result_length != hash_digest_size || result_buf_size != (2 * hash_digest_size)) { + if (evp_result != evp_success_status || result_length != hash_digest_size || + result_buf_size != (2 * hash_digest_size)) { gdv_fn_context_set_error_msg(context, "Could not obtain the hash for the defined value"); EVP_MD_CTX_free(md_ctx); From 1fe878b8754175e31ea31f4fae0a9f682a9832d1 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Mon, 20 Apr 2026 21:35:09 +0000 Subject: [PATCH 7/8] remove static since its not needed in anonymous namespace --- cpp/src/gandiva/hash_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index ed1731d7277a..2be9e55b90f9 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -27,7 +27,7 @@ namespace { /// It uses the EVP API in the OpenSSL library to generate /// the hash. The type of the hash is defined by the /// \b hash_type \b parameter. -static const char* gdv_hash_using_openssl(int64_t context, const void* message, +const char* gdv_hash_using_openssl(int64_t context, const void* message, size_t message_length, const EVP_MD* hash_type, uint32_t result_buf_size, int32_t* out_length) { EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); From c1856e0f19b9df60ba2b051f552820bb804cb907 Mon Sep 17 00:00:00 2001 From: "logan.riggs@gmail.com" Date: Mon, 20 Apr 2026 21:36:32 +0000 Subject: [PATCH 8/8] lint --- cpp/src/gandiva/hash_utils.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/gandiva/hash_utils.cc b/cpp/src/gandiva/hash_utils.cc index 2be9e55b90f9..a90f92ad9513 100644 --- a/cpp/src/gandiva/hash_utils.cc +++ b/cpp/src/gandiva/hash_utils.cc @@ -28,8 +28,8 @@ namespace { /// the hash. The type of the hash is defined by the /// \b hash_type \b parameter. const char* gdv_hash_using_openssl(int64_t context, const void* message, - size_t message_length, const EVP_MD* hash_type, - uint32_t result_buf_size, int32_t* out_length) { + size_t message_length, const EVP_MD* hash_type, + uint32_t result_buf_size, int32_t* out_length) { EVP_MD_CTX* md_ctx = EVP_MD_CTX_new(); if (md_ctx == nullptr) {