Don't assume a Mifare Classic Sector Number will always fit in a byte (currently it's a uint8_t but it exposes some problems).
This commit is contained in:
parent
825d59e938
commit
4417a13f9f
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ mifare_application_alloc (Mad mad, MadAid aid, size_t size)
|
|||
if (sector_map[i])
|
||||
n++;
|
||||
|
||||
if (!(res = malloc (n+1)))
|
||||
if (!(res = malloc (sizeof (*res) * (n+1))))
|
||||
return NULL;
|
||||
|
||||
n = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue