]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Merge branch 'master' of https://github.com/iceman1001/proxmark3
authoriceman1001 <iceman@iuse.se>
Tue, 2 Aug 2016 14:06:40 +0000 (16:06 +0200)
committericeman1001 <iceman@iuse.se>
Tue, 2 Aug 2016 14:06:40 +0000 (16:06 +0200)
1  2 
client/cmdhflegic.c

diff --combined client/cmdhflegic.c
index da1b20b1cd422b46f7a8a3c3a7910c5d1d3a9ffd,0adf3c596b8cf1334cbf278c3b9d4c9bed5a0cdb..731cead1097a5f80b0c56c104bfe81346b75b702
@@@ -527,8 -527,7 +527,7 @@@ int CmdLegicRfRawWrite(const char *Cmd
                PrintAndLog("# changing the DCF is irreversible  #");
                PrintAndLog("#####################################");
                PrintAndLog("do youe really want to continue? y(es) n(o)");             
-               scanf(" %c", &answer);
-               if (answer == 'y' || answer == 'Y') {
+               if (scanf(" %c", &answer) > 0 && (answer == 'y' || answer == 'Y')) {
                        SendCommand(&c);
                        return 0;
                }
@@@ -612,7 -611,7 +611,7 @@@ int CmdLegicCalcCrc8(const char *Cmd)
        }
        //Validations
        if (errors){
 -              if (data != NULL) free(data);
 +              if (data) free(data);
                return usage_legic_calccrc8();
        }
        
                        break;
        }
        
 -      if (data != NULL) free(data);
 +      if (data) free(data);
        return 0;
  } 
   
Impressum, Datenschutz