]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
cmdhf14b.c: fixing a crash in the crc computation when missing data (e.g. with 'hf...
authorizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 20 Oct 2013 11:46:51 +0000 (11:46 +0000)
committerizsh@fail0verflow.com <izsh@fail0verflow.com@ef4ab9da-24cd-11de-8aaa-f3a34680c41f>
Sun, 20 Oct 2013 11:46:51 +0000 (11:46 +0000)
client/cmdhf14b.c

index 5317994fcb48fdded09d06b9fbcfcfc82b943477..6696ac0947f2fab7a1d62566ab40b09ca0707ee9 100644 (file)
@@ -334,6 +334,11 @@ int CmdHF14BCmdRaw (const char *cmd) {
         PrintAndLog("Invalid char on input");
         return 0;
     }
+    if (datalen == 0)
+    {
+      PrintAndLog("Missing data input");
+      return 0;
+    }
     if(crc)
     {
         uint8_t first, second;
Impressum, Datenschutz