mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-08 09:10:06 +08:00
fix: null check
This commit is contained in:
parent
3efa05060e
commit
c83b2e7fff
1 changed files with 5 additions and 3 deletions
|
@ -93,9 +93,11 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
|||
PrintAndLogEx(WARNING, "out of memory?");
|
||||
return 0;
|
||||
}
|
||||
memcpy(tmp, model.name, size);
|
||||
Models[mode] = tmp;
|
||||
width[mode] = plen(model.spoly);
|
||||
if ( model.name != NULL ) {
|
||||
memcpy(tmp, model.name, size);
|
||||
Models[mode] = tmp;
|
||||
width[mode] = plen(model.spoly);
|
||||
}
|
||||
}
|
||||
mfree(&model);
|
||||
} else { //reveng -s
|
||||
|
|
Loading…
Reference in a new issue