FIX: wrongly assume the max size of UID to 8 bytes. Max size should be 10 bytes.

This commit is contained in:
Brian Pow 2018-02-05 22:36:30 +08:00
parent 551cc5539b
commit 45c20d62b8

View file

@ -360,7 +360,7 @@ int GetHFMF14AUID(uint8_t *uid, int *uidlen) {
}
char * GenerateFilename(const char *prefix, const char *suffix){
uint8_t uid[8] = {0,0,0,0,0,0,0,0};
uint8_t uid[10] = {0,0,0,0,0,0,0,0,0,0};
int uidlen=0;
char * fptr = malloc (sizeof (char) * (strlen(prefix) + strlen(suffix)) + sizeof(uid)*2 + 1);