Leave enougth room for the final \0.

This commit is contained in:
Romain Tartière 2015-06-01 13:15:42 +02:00
parent 2c47f42538
commit 1e43abd9d4

View file

@ -221,7 +221,7 @@ freefare_get_tag_uid (FreefareTag tag)
char *res = NULL;
switch (tag->info.nm.nmt) {
case NMT_FELICA:
if ((res = malloc (16))) {
if ((res = malloc (17))) {
for (size_t i = 0; i < 8; i++)
snprintf (res + 2*i, 3, "%02x", tag->info.nti.nfi.abtId[i]);
}