]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmfdes.c
FIX: Coverity, unchecked return value, CID #121292,..
[proxmark3-svn] / client / cmdhfmfdes.c
index 516b41bd72d258147e46037fead2ee861cdc2e08..b8db1cab960950e04dae389edb5cc9a9e6a508ac 100644 (file)
@@ -12,7 +12,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-//#include <openssl/des.h>
 #include "loclass/des.h"
 #include "cmdmain.h"
 #include "proxmark3.h"
@@ -612,7 +611,7 @@ int CmdHF14ADesAuth(const char *Cmd){
        
        c.d.asBytes[0] = keylength;
        memcpy(c.d.asBytes+1, key, keylength);
-       
+       clearCommandBuffer();
     SendCommand(&c);
        UsbCommand resp;
        
@@ -637,8 +636,7 @@ int CmdHF14ADesAuth(const char *Cmd){
 }
 
 
-static command_t CommandTable[] =
-{
+static command_t CommandTable[] = {
   {"help",             CmdHelp,                                        1, "This help"},
   {"info",             CmdHF14ADesInfo,                        0, "Get MIFARE DesFire information"},
   {"enum",             CmdHF14ADesEnumApplications,0, "Tries enumerate all applications"},
@@ -648,18 +646,17 @@ static command_t CommandTable[] =
   {NULL, NULL, 0, NULL}
 };
 
-int CmdHFMFDes(const char *Cmd)
-{
+int CmdHFMFDes(const char *Cmd) {
    // flush
-   WaitForResponseTimeout(CMD_ACK,NULL,100);
-   CmdsParse(CommandTable, Cmd);
-  return 0;
+       clearCommandBuffer();
+       //WaitForResponseTimeout(CMD_ACK,NULL,100);
+       CmdsParse(CommandTable, Cmd);
+       return 0;
 }
 
-int CmdHelp(const char *Cmd)
-{
-  CmdsHelp(CommandTable);
-  return 0;
+int CmdHelp(const char *Cmd) {
+       CmdsHelp(CommandTable);
+       return 0;
 }
 
 
Impressum, Datenschutz