Skip to content

Commit

Permalink
Merge pull request #7 from mobilecoinofficial/bugfix/overflow-warnings
Browse files Browse the repository at this point in the history
Backport mbedtls pull request #4506. Fixes issue #6.
  • Loading branch information
christian-oudard authored Nov 18, 2021
2 parents ce4cf3e + d6fc731 commit 49a293a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mbedtls-sys/vendor/include/mbedtls/sha512.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int mbedtls_sha512_update_ret( mbedtls_sha512_context *ctx,
* \return A negative error code on failure.
*/
int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
unsigned char output[64] );
unsigned char *output );

/**
* \brief This function processes a single data block within
Expand Down Expand Up @@ -255,7 +255,7 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_process(
*/
int mbedtls_sha512_ret( const unsigned char *input,
size_t ilen,
unsigned char output[64],
unsigned char *output,
int is384 );

#if !defined(MBEDTLS_DEPRECATED_REMOVED)
Expand Down
4 changes: 2 additions & 2 deletions mbedtls-sys/vendor/library/sha512.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void mbedtls_sha512_update( mbedtls_sha512_context *ctx,
* SHA-512 final digest
*/
int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
unsigned char output[64] )
unsigned char *output )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned used;
Expand Down Expand Up @@ -485,7 +485,7 @@ void mbedtls_sha512_finish( mbedtls_sha512_context *ctx,
*/
int mbedtls_sha512_ret( const unsigned char *input,
size_t ilen,
unsigned char output[64],
unsigned char *output,
int is384 )
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
Expand Down

0 comments on commit 49a293a

Please sign in to comment.