fix: null check
This commit is contained in:
@@ -93,9 +93,11 @@ int GetModels(char *Models[], int *count, uint8_t *width) {
|
|||||||
PrintAndLogEx(WARNING, "out of memory?");
|
PrintAndLogEx(WARNING, "out of memory?");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memcpy(tmp, model.name, size);
|
if ( model.name != NULL ) {
|
||||||
Models[mode] = tmp;
|
memcpy(tmp, model.name, size);
|
||||||
width[mode] = plen(model.spoly);
|
Models[mode] = tmp;
|
||||||
|
width[mode] = plen(model.spoly);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mfree(&model);
|
mfree(&model);
|
||||||
} else { //reveng -s
|
} else { //reveng -s
|
||||||
|
|||||||
Reference in New Issue
Block a user