X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/3d542a3dfa511ff7a7545136c1980060cf676f02..refs/pull/356/head:/client/cmdhfmf.c?ds=sidebyside

diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c
index 28198876..d909cd8c 100644
--- a/client/cmdhfmf.c
+++ b/client/cmdhfmf.c
@@ -19,6 +19,7 @@
 #include "cmdmain.h"
 #include "cmdhfmfhard.h"
 #include "util.h"
+#include "util_posix.h"
 #include "usb_cmd.h"
 #include "ui.h"
 #include "mifarehost.h"
@@ -905,7 +906,7 @@ int CmdHF14AMfChk(const char *Cmd)
 	char filename[FILE_PATH_SIZE]={0};
 	char buf[13];
 	uint8_t *keyBlock = NULL, *p;
-	uint8_t stKeyBlock = 20;
+	uint16_t stKeyBlock = 20;
 	
 	int i, res;
 	int	keycnt = 0;
@@ -970,6 +971,7 @@ int CmdHF14AMfChk(const char *Cmd)
 		break;
 	default:
 		PrintAndLog("Key type must be A , B or ?");
+		free(keyBlock);
 		return 1;
 	};