minor parsing issue

This commit is contained in:
iceman1001
2024-03-19 11:11:33 +01:00
parent 59bc927698
commit d1d9d00d99
3 changed files with 738 additions and 2 deletions
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -44,7 +44,10 @@ static int openAIDFile(json_t **root, bool verbose) {
goto out;
}
PrintAndLogEx(DEBUG, "Loaded file " _YELLOW_("%s") " " _GREEN_("%zu") " records ( " _GREEN_("ok") " )", path, json_array_size(*root));
PrintAndLogEx(DEBUG, "Loaded file " _YELLOW_("%s") " " _GREEN_("%zu") " records ( " _GREEN_("ok") " )"
, path
, json_array_size(*root)
);
out:
free(path);
return retval;
+5 -1
View File
@@ -468,7 +468,11 @@ static int CmdFlashMemInfo(const char *Cmd) {
// shall_write = arg_get_lit(ctx, 5);
CLIParserFree(ctx);
if (res || (dlen > 0 && dlen < sizeof(id))) {
if (res) {
return PM3_EINVARG;
}
if (dlen > 0 && dlen < sizeof(id)) {
PrintAndLogEx(FAILED, "Error parsing flash memory id, expect 8, got %d", dlen);
return PM3_EINVARG;
}