Address warnings in arm9

This commit is contained in:
Edoardo Lolletti 2024-07-14 00:32:13 +02:00
parent 54e6c23277
commit f1d6f13ff2
3 changed files with 8 additions and 5 deletions

View File

@ -69,8 +69,11 @@ void getConsoleID(u8 *consoleID)
u8 key_x[16];////key3_x - contains a DSi console id (which just happens to be the LFCS on 3ds)
u8 empty_buff[8] = {0};
memcpy(key, fifo, 16); //receive the goods from arm7
//receive the goods from arm7
for(size_t i = 0; i < 16; ++i)
{
key[i] = fifo[i];
}
if(memcmp(key + 8, empty_buff, 8) == 0)
{
@ -204,7 +207,7 @@ bool nandio_write_nocash_footer(NocashFooter* footer)
// len is guaranteed <= CRYPT_BUF_LEN
static bool write_sectors(sec_t start, sec_t len, const void *buffer)
{
static u8 writeCopy[SECTOR_SIZE*16];
static u8 writeCopy[SECTOR_SIZE*CRYPT_BUF_LEN];
memcpy(writeCopy, buffer, len * SECTOR_SIZE);
dsi_nand_crypt(crypt_buf, writeCopy, start * SECTOR_SIZE / AES_BLOCK_SIZE, len * SECTOR_SIZE / AES_BLOCK_SIZE);

View File

@ -53,7 +53,7 @@ void dsi_set_ctr(dsi_context* ctx, const unsigned char ctr[16])
ctx->ctr[i] = ctr[15-i];
}
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[12])
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[16])
{
dsi_set_key(ctx, key);
dsi_set_ctr(ctx, ctr);

View File

@ -33,7 +33,7 @@ void dsi_add_ctr(dsi_context* ctx, unsigned int carry);
void dsi_set_ctr(dsi_context* ctx, const unsigned char ctr[16]);
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[12]);
void dsi_init_ctr(dsi_context* ctx, const unsigned char key[16], const unsigned char ctr[16]);
void dsi_crypt_ctr(dsi_context* ctx, const void* in, void* out, unsigned int len);