state = lfsr_common_prefix_ex(nr, ks3x);
if (!state) {
- key_count = 0;
PrintAndLog("Failed getting states");
return 1;
}
// first call to this function. clear all other stuff and set new found states.
if (last_keylist == NULL) {
- key_count = 0;
free(last_keylist);
last_keylist = state_s;
PrintAndLog("parity is all zero, testing special attack. First call, this attack needs at least two calls. Hold on...");
printf("key_count: %d\n", key_count);
if ( key_count == 0 ){
free(state);
+ state = NULL;
return 0;
}
free(last_keylist);
last_keylist = NULL;
free(state);
+ state = NULL;
return retval;
}