Proxmark3 developers community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

#1 2011-05-15 22:22:11

blubbel
Member
Registered: 2009-08-21
Posts: 1

"hf 14a reader" segfault fix for 64 bit systems

I constantly got a segmentation fault on the proxmark3 client when executing "hf 14a reader" on Mac OS 10.6. It turns out that the pointer returned by WaitForResponse() was truncated to 32 bit because the function was implicitly defined. The following patch fixes this by adding the declarations of the implicitly defined functions.

Feel free to use it!

diff --git a/client/cmdhf14a.c b/client/cmdhf14a.c
index 145f6a6..fd98f58 100644
--- a/client/cmdhf14a.c
+++ b/client/cmdhf14a.c
@@ -18,6 +18,8 @@
 #include "cmdparser.h"
 #include "cmdhf14a.h"
 #include "common.h"
+#include "cmdmain.h"
+#include "util.h"
 
 static int CmdHelp(const char *Cmd);
 
diff --git a/client/util.h b/client/util.h
index 4833079..2338963 100644
--- a/client/util.h
+++ b/client/util.h
@@ -1 +1,2 @@
 void print_hex(const uint8_t * data, const size_t len);
+char * sprint_hex(const uint8_t * data, const size_t len);

Offline

Board footer

Powered by FluxBB