Switch to static arrays
This commit is contained in:
parent
14162828ea
commit
38088e80e1
@ -43,14 +43,14 @@ static inline void pathChanger(u8 *pos)
|
||||
|
||||
if(pathSize < 6 || pathSize > 57) return;
|
||||
|
||||
u8 path[pathSize];
|
||||
u8 path[57];
|
||||
fileRead(path, pathFile, pathSize);
|
||||
if(path[pathSize - 1] == 0xA) pathSize--;
|
||||
if(path[pathSize - 1] == 0xD) pathSize--;
|
||||
|
||||
if(pathSize < 6 || pathSize > 57 || path[0] != '/' || memcmp(&path[pathSize - 4], ".bin", 4) != 0) return;
|
||||
|
||||
u16 finalPath[pathSize + 1];
|
||||
u16 finalPath[58];
|
||||
for(u32 i = 0; i < pathSize; i++)
|
||||
finalPath[i] = (u16)path[i];
|
||||
|
||||
|
@ -155,7 +155,7 @@ bool verifyPin(u32 pinMode)
|
||||
|
||||
if(messageSize > 0 && messageSize <= 800)
|
||||
{
|
||||
char message[messageSize + 1];
|
||||
char message[801];
|
||||
|
||||
if(fileRead(message, messageFile, messageSize) == messageSize)
|
||||
{
|
||||
|
Reference in New Issue
Block a user