Skip to content

Commit

Permalink
fix the free ctx calls
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Oct 30, 2023
1 parent b0ee6ae commit 2763ead
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions client/src/cmdhfntag424.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,20 +792,16 @@ static int CmdHF_ntag424_info(const char *Cmd) {
return PM3_SUCCESS;
}

static int ntag424_cli_get_auth_information(CLIParserContext *ctx, int key_no_index, int key_index, int *keyno, uint8_t *key_out) {
static int ntag424_cli_get_auth_information(CLIParserContext *ctx, int keyno_index, int key_index, int *keyno, uint8_t *key_out) {

int keylen = 16;
if (keyno) {
*keyno = arg_get_int(ctx, key_no_index);
*keyno = arg_get_int(ctx, keyno_index);
}

int keylen = 16;
uint8_t key[16] = {0};
CLIGetHexWithReturn(ctx, key_index, key, &keylen);
if (CLIParamHexToBuf(arg_get_str((ctx), key_index), key, sizeof(key), &keylen)) {

}

if (keylen != 16) {
if (CLIParamHexToBuf(arg_get_str(ctx, key_index), key, sizeof(key), &keylen) || (keylen != 16)) {
return PM3_ESOFT;
}

Expand Down

0 comments on commit 2763ead

Please sign in to comment.