From 3bfb4d49a621547572137e85ebab54bc793b5900 Mon Sep 17 00:00:00 2001 From: Aram Date: Wed, 20 Apr 2016 11:52:49 +0200 Subject: [PATCH] Fixed out of bounds error reported by Iceman1001 --- pwpiwi_proxmark3_hard_nested.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pwpiwi_proxmark3_hard_nested.patch b/pwpiwi_proxmark3_hard_nested.patch index f346fee..a977be7 100644 --- a/pwpiwi_proxmark3_hard_nested.patch +++ b/pwpiwi_proxmark3_hard_nested.patch @@ -295,7 +295,7 @@ index 91e595d..dc3557f 100644 ZLIBSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c ZLIB_FLAGS = -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c -index b3893ea..cd5cf9f 100644 +index b3893ea..bf71a08 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -20,12 +20,15 @@ @@ -609,8 +609,8 @@ index b3893ea..cd5cf9f 100644 + + // enumerate states using all hardware threads, each thread handles one bucket + PrintAndLog("Starting %u cracking threads to search %u buckets containing a total of %lu states...", thread_count, bucket_count, maximum_states); -+ pthread_t threads[thread_count]; + thread_count = sysconf(_SC_NPROCESSORS_CONF); ++ pthread_t threads[thread_count]; + for(size_t i = 0; i < thread_count; i++){ + pthread_create(&threads[i], NULL, crack_states_thread, (void*) i); + }