Skip to content

Commit

Permalink
fix: convert arg 2 of OpenSSL EVP_DigestFinal to a pointer of unsigne…
Browse files Browse the repository at this point in the history
…d char
  • Loading branch information
luau-project committed Jan 9, 2025
1 parent 53c9000 commit deb9f6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lua-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static void lua_hash_digest_finalize_core(lua_State *L, void *buffer, LuaDigestI
#elif defined(LUA_HASH_USE_OPENSSL)

unsigned int len = 0;
if (!EVP_DigestFinal(info->ctx->ctx_handle, buffer, &len))
if (!EVP_DigestFinal(info->ctx->ctx_handle, (unsigned char *)buffer, &len))
{
if (free_buffer)
{
Expand Down Expand Up @@ -1169,7 +1169,7 @@ static int lua_hash_oneshot(lua_State *L)
#elif defined(LUA_HASH_USE_OPENSSL)

unsigned int len = 0;
if (!EVP_DigestFinal(ctx_handle, output_buffer, &len))
if (!EVP_DigestFinal(ctx_handle, (unsigned char *)output_buffer, &len))
{
free(output_buffer);
EVP_MD_CTX_destroy(ctx_handle);
Expand Down

0 comments on commit deb9f6f

Please sign in to comment.