mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
DesfireExchangeEx dyn memory
This commit is contained in:
parent
f827b85cda
commit
02316e5fc3
1 changed files with 5 additions and 1 deletions
|
@ -799,7 +799,9 @@ int DesfireExchangeEx(bool activate_field, DesfireContext_t *ctx, uint8_t cmd, u
|
|||
if (!PrintChannelModeWarning(cmd, ctx->secureChannel, ctx->cmdSet, ctx->commMode))
|
||||
DesfirePrintContext(ctx);
|
||||
|
||||
uint8_t databuf[250 * 5] = {0};
|
||||
uint8_t *databuf = calloc(DESFIRE_BUFFER_SIZE, 1);
|
||||
if (databuf == NULL)
|
||||
return PM3_EMALLOC;
|
||||
size_t databuflen = 0;
|
||||
|
||||
switch (ctx->cmdSet) {
|
||||
|
@ -828,10 +830,12 @@ int DesfireExchangeEx(bool activate_field, DesfireContext_t *ctx, uint8_t cmd, u
|
|||
}
|
||||
break;
|
||||
case DCCISO:
|
||||
free(databuf);
|
||||
return PM3_EAPDU_FAIL;
|
||||
break;
|
||||
}
|
||||
|
||||
free(databuf);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue