mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
sam_seos, sam_picopass: switch from static allocation to BigBuf
This commit is contained in:
parent
15aea059ef
commit
2464cf60fd
2 changed files with 14 additions and 4 deletions
|
@ -49,8 +49,12 @@ static int sam_send_request_iso15(const uint8_t *const request, const uint8_t re
|
|||
if (g_dbglevel >= DBG_DEBUG)
|
||||
DbpString("start sam_send_request_iso14a");
|
||||
|
||||
uint8_t buf1[ISO7816_MAX_FRAME] = {0};
|
||||
uint8_t buf2[ISO7816_MAX_FRAME] = {0};
|
||||
uint8_t * buf1 = BigBuf_malloc(ISO7816_MAX_FRAME);
|
||||
uint8_t * buf2 = BigBuf_malloc(ISO7816_MAX_FRAME);
|
||||
if(buf1 == NULL || buf2 == NULL){
|
||||
res = PM3_EMALLOC;
|
||||
goto out;
|
||||
}
|
||||
|
||||
uint8_t *sam_tx_buf = buf1;
|
||||
uint16_t sam_tx_len;
|
||||
|
@ -235,6 +239,7 @@ static int sam_send_request_iso15(const uint8_t *const request, const uint8_t re
|
|||
goto out;
|
||||
|
||||
out:
|
||||
BigBuf_free();
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue