mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Fix IAR control bypasses initialisation warning
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@@ -681,6 +681,7 @@ int mbedtls_sha256_finish(mbedtls_sha256_context *ctx,
|
|||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
uint32_t used;
|
uint32_t used;
|
||||||
uint32_t high, low;
|
uint32_t high, low;
|
||||||
|
int truncated = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add padding: 0x80 then 0x00 until 8 bytes remain for the length
|
* Add padding: 0x80 then 0x00 until 8 bytes remain for the length
|
||||||
@@ -728,7 +729,6 @@ int mbedtls_sha256_finish(mbedtls_sha256_context *ctx,
|
|||||||
MBEDTLS_PUT_UINT32_BE(ctx->state[5], output, 20);
|
MBEDTLS_PUT_UINT32_BE(ctx->state[5], output, 20);
|
||||||
MBEDTLS_PUT_UINT32_BE(ctx->state[6], output, 24);
|
MBEDTLS_PUT_UINT32_BE(ctx->state[6], output, 24);
|
||||||
|
|
||||||
int truncated = 0;
|
|
||||||
#if defined(MBEDTLS_SHA224_C)
|
#if defined(MBEDTLS_SHA224_C)
|
||||||
truncated = ctx->is224;
|
truncated = ctx->is224;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -828,6 +828,7 @@ int mbedtls_sha512_finish(mbedtls_sha512_context *ctx,
|
|||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
unsigned used;
|
unsigned used;
|
||||||
uint64_t high, low;
|
uint64_t high, low;
|
||||||
|
int truncated = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add padding: 0x80 then 0x00 until 16 bytes remain for the length
|
* Add padding: 0x80 then 0x00 until 16 bytes remain for the length
|
||||||
@@ -874,7 +875,6 @@ int mbedtls_sha512_finish(mbedtls_sha512_context *ctx,
|
|||||||
sha512_put_uint64_be(ctx->state[4], output, 32);
|
sha512_put_uint64_be(ctx->state[4], output, 32);
|
||||||
sha512_put_uint64_be(ctx->state[5], output, 40);
|
sha512_put_uint64_be(ctx->state[5], output, 40);
|
||||||
|
|
||||||
int truncated = 0;
|
|
||||||
#if defined(MBEDTLS_SHA384_C)
|
#if defined(MBEDTLS_SHA384_C)
|
||||||
truncated = ctx->is384;
|
truncated = ctx->is384;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user