From fc2b20b273ebf7345456888038bd3f954cccb716 Mon Sep 17 00:00:00 2001 From: jsteube Date: Mon, 4 Jul 2016 21:13:23 +0200 Subject: [PATCH] Fixed a bug where hashcat crashes in case of a scrypt P setting > 1 --- docs/changes.txt | 1 + src/hashcat.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index d44d6e7..9e8c1a3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -14,6 +14,7 @@ - Fixed a bug where hashcat is suppressing --machine-readable output in the final status update - Fixed a bug where hashcat did not check the return of realpath() and crashes uncontrolled if the path does not exist - Fixed a bug where hashcat crashes for accessing deallocated buffer if user spams "s" shortly before hashcat shuts down +- Fixed a bug where hashcat crashes in case of a scrypt P setting > 1 * changes v2.01 -> v3.00: diff --git a/src/hashcat.c b/src/hashcat.c index e508082..3400ee2 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -15168,7 +15168,7 @@ int main (int argc, char **argv) } } - data.scrypt_tmp_size = (128 * scrypt_r); + data.scrypt_tmp_size = (128 * scrypt_r * scrypt_p); device_param->kernel_accel_min = 1; device_param->kernel_accel_max = 8; @@ -15212,7 +15212,7 @@ int main (int argc, char **argv) return -1; } - if (quiet == 0) log_info ("SCRYPT tmto optimizer value set to: %u, mem: %u\n", data.scrypt_tmto_final, size_scrypt); + if (quiet == 0) log_info ("SCRYPT tmto optimizer value set to: %u, mem: %llu\n", data.scrypt_tmto_final, (unsigned long long int) size_scrypt); } size_t size_scrypt4 = size_scrypt / 4; -- 2.25.1