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:
Romain Tartiere 2010-07-03 06:24:29 +00:00
parent 825d59e938
commit 4417a13f9f

View file

@ -135,7 +135,7 @@ mifare_application_alloc (Mad mad, MadAid aid, size_t size)
if (sector_map[i]) if (sector_map[i])
n++; n++;
if (!(res = malloc (n+1))) if (!(res = malloc (sizeof (*res) * (n+1))))
return NULL; return NULL;
n = 0; n = 0;