This commit is contained in:
iceman1001 2020-10-06 18:00:00 +02:00
commit 64f9bb5e01
20 changed files with 135 additions and 135 deletions

View file

@ -268,15 +268,13 @@ static void *brute_thread(void *arguments) {
printf("CMD enc(%08x)\n", cmd_enc);
printf(" dec(%08x)\t", decrypted);
uint8_t isOK = 0;
// check if cmd exists
isOK = checkValidCmd(decrypted);
uint8_t isOK = checkValidCmd(decrypted);
(void)isOK;
// Add a crc-check.
isOK = checkCRC(decrypted);
if (!isOK) {
if (isOK == false) {
printf("<-- not a valid cmd\n");
pthread_mutex_unlock(&print_lock);
free(revstate);
@ -305,8 +303,10 @@ static void *brute_thread(void *arguments) {
pthread_mutex_unlock(&print_lock);
}
}
if (revstate)
free(revstate);
free(args);
free(args);
return NULL;
}