mirror of
https://github.com/espressif/mbedtls.git
synced 2025-05-09 19:31:18 +08:00
Address missed instances of sizeof
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
1868870fba
commit
ecb44208d1
@ -1252,7 +1252,7 @@ static int ecp_mod_p255(mbedtls_mpi *N)
|
||||
return MBEDTLS_ERR_ECP_BAD_INPUT_DATA;
|
||||
}
|
||||
M.p = Mp;
|
||||
memset(Mp, 0, sizeof Mp);
|
||||
memset(Mp, 0, sizeof(Mp));
|
||||
memcpy(Mp, N->p + P255_WIDTH - 1, M.n * sizeof(mbedtls_mpi_uint));
|
||||
MBEDTLS_MPI_CHK(mbedtls_mpi_shift_r(&M, 255 % (8 * sizeof(mbedtls_mpi_uint))));
|
||||
M.n++; /* Make room for multiplication by 19 */
|
||||
|
@ -12,8 +12,8 @@ void md2_text(char *text_src_string, data_t *hash)
|
||||
unsigned char src_str[100];
|
||||
unsigned char output[16];
|
||||
|
||||
memset(src_str, 0x00, sizeof src_str);
|
||||
memset(output, 0x00, sizeof output);
|
||||
memset(src_str, 0x00, sizeof(src_str));
|
||||
memset(output, 0x00, sizeof(output));
|
||||
|
||||
strncpy((char *) src_str, text_src_string, sizeof(src_str) - 1);
|
||||
|
||||
@ -21,7 +21,7 @@ void md2_text(char *text_src_string, data_t *hash)
|
||||
TEST_ASSERT(ret == 0);
|
||||
|
||||
TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
|
||||
sizeof output, hash->len) == 0);
|
||||
sizeof(output), hash->len) == 0);
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
@ -32,8 +32,8 @@ void md4_text(char *text_src_string, data_t *hash)
|
||||
unsigned char src_str[100];
|
||||
unsigned char output[16];
|
||||
|
||||
memset(src_str, 0x00, sizeof src_str);
|
||||
memset(output, 0x00, sizeof output);
|
||||
memset(src_str, 0x00, sizeof(src_str));
|
||||
memset(output, 0x00, sizeof(output));
|
||||
|
||||
strncpy((char *) src_str, text_src_string, sizeof(src_str) - 1);
|
||||
|
||||
@ -41,7 +41,7 @@ void md4_text(char *text_src_string, data_t *hash)
|
||||
TEST_ASSERT(ret == 0);
|
||||
|
||||
TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
|
||||
sizeof output, hash->len) == 0);
|
||||
sizeof(output), hash->len) == 0);
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user