Fixed a bug where hashcat crashes in case of a scrypt P setting > 1
authorjsteube <jens.steube@gmail.com>
Mon, 4 Jul 2016 19:13:23 +0000 (21:13 +0200)
committerjsteube <jens.steube@gmail.com>
Mon, 4 Jul 2016 19:13:23 +0000 (21:13 +0200)
docs/changes.txt
src/hashcat.c

index d44d6e7..9e8c1a3 100644 (file)
@@ -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:
 
index e508082..3400ee2 100644 (file)
@@ -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;