mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fix to resolve possible buffer overflow with atmel_get_rev_info
when using byte.
This commit is contained in:
@ -308,7 +308,7 @@ static int atmel_init_enc_key(void)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int atmel_get_rev_info(byte* revision)
|
int atmel_get_rev_info(word32* revision)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
ret = atcab_info((uint8_t*)revision);
|
ret = atcab_info((uint8_t*)revision);
|
||||||
@ -319,7 +319,7 @@ int atmel_get_rev_info(byte* revision)
|
|||||||
void atmel_show_rev_info(void)
|
void atmel_show_rev_info(void)
|
||||||
{
|
{
|
||||||
#ifdef WOLFSSL_ATECC508A_DEBUG
|
#ifdef WOLFSSL_ATECC508A_DEBUG
|
||||||
byte revision = 0;
|
word32 revision = 0;
|
||||||
atmel_get_rev_info(&revision);
|
atmel_get_rev_info(&revision);
|
||||||
printf("ATECC508A Revision: %x\n", (word32)revision);
|
printf("ATECC508A Revision: %x\n", (word32)revision);
|
||||||
#endif
|
#endif
|
||||||
|
@ -94,7 +94,7 @@ int atmel_set_slot_allocator(atmel_slot_alloc_cb alloc,
|
|||||||
atmel_slot_dealloc_cb dealloc);
|
atmel_slot_dealloc_cb dealloc);
|
||||||
|
|
||||||
int atmel_ecc_translate_err(int status);
|
int atmel_ecc_translate_err(int status);
|
||||||
int atmel_get_rev_info(byte* revision);
|
int atmel_get_rev_info(word32* revision);
|
||||||
void atmel_show_rev_info(void);
|
void atmel_show_rev_info(void);
|
||||||
|
|
||||||
/* The macro ATECC_GET_ENC_KEY can be set to override the default
|
/* The macro ATECC_GET_ENC_KEY can be set to override the default
|
||||||
|
Reference in New Issue
Block a user