]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/mifarehost.c
fix: hf mf mifare - populate keylist (#568)
[proxmark3-svn] / client / mifarehost.c
index b6eb60f000d61281d9d88d656ae455acf4acca25..2bd21077e9b6ba5cd23c276445cccc809f3dbf04 100644 (file)
@@ -201,9 +201,9 @@ int mfDarkside(uint64_t *key)
                        int size = keycount - i > max_keys ? max_keys : keycount - i;\r
                        for (int j = 0; j < size; j++) {\r
                                if (par_list == 0) {\r
-                                       num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock);\r
+                                       num_to_bytes(last_keylist[i*max_keys + j], 6, keyBlock+(j*6));\r
                                } else {\r
-                                       num_to_bytes(keylist[i*max_keys + j], 6, keyBlock);\r
+                                       num_to_bytes(keylist[i*max_keys + j], 6, keyBlock+(j*6));\r
                                }\r
                        }\r
                        if (!mfCheckKeys(0, 0, false, size, keyBlock, key)) {\r
@@ -297,7 +297,13 @@ typedef
 \r
 \r
 // wrapper function for multi-threaded lfsr_recovery32\r
-void* nested_worker_thread(void *arg)\r
+void\r
+#ifdef __has_attribute\r
+#if __has_attribute(force_align_arg_pointer)\r
+__attribute__((force_align_arg_pointer)) \r
+#endif\r
+#endif\r
+*nested_worker_thread(void *arg)\r
 {\r
        struct Crypto1State *p1;\r
        StateList_t *statelist = arg;\r
@@ -311,6 +317,7 @@ void* nested_worker_thread(void *arg)
        return statelist->head.slhead;\r
 }\r
 \r
+\r
 int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t *resultKey, bool calibrate)\r
 {\r
        uint16_t i;\r
Impressum, Datenschutz