diff --git a/client/cmdcrc.c b/client/cmdcrc.c index 2b50f2b91..178df6add 100644 --- a/client/cmdcrc.c +++ b/client/cmdcrc.c @@ -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