fix 'mem spiffs view' and bad file stats retrieval

This commit is contained in:
iceman1001 committed 2021-03-10 10:43:49 +01:00
1 parent bf49f4432b
commit 1b2091932e
2 files changed
+10 -8

No files matched your search

+5
View File
@@ -497,6 +497,11 @@ static int CmdFlashMemSpiFFSView(const char *Cmd) {
}
uint32_t len = resp.data.asDwords[0];
if (len == 0) {
PrintAndLogEx(ERR, "error, failed to retrieve file stats on SPIFFSS");
return PM3_EFAILED;
}
uint8_t *dump = calloc(len, sizeof(uint8_t));
if (!dump) {
PrintAndLogEx(ERR, "error, cannot allocate memory ");