mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-31 19:01:05 +00:00
Fix segfault in related to weak-hash-check on CPU devices
Move typedef for bool datatype to common.h
This commit is contained in:
parent
54ed58e28b
commit
0ff49c5b44
@ -93,6 +93,8 @@ void log_out (FILE *fp, const char *fmt, ...);
|
|||||||
void log_info (const char *fmt, ...);
|
void log_info (const char *fmt, ...);
|
||||||
void log_error (const char *fmt, ...);
|
void log_error (const char *fmt, ...);
|
||||||
|
|
||||||
|
typedef int bool; // this is ugly but ADL requires the bool datatype
|
||||||
|
|
||||||
typedef uint32_t uint; // we should rename to u32, sooner or later, for consistency
|
typedef uint32_t uint; // we should rename to u32, sooner or later, for consistency
|
||||||
typedef uint64_t u64;
|
typedef uint64_t u64;
|
||||||
|
|
||||||
|
@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
// this is ugly but ADL requires the bool datatype
|
|
||||||
|
|
||||||
typedef int bool;
|
|
||||||
|
|
||||||
#include <adl_sdk.h>
|
#include <adl_sdk.h>
|
||||||
|
|
||||||
typedef int HM_ADAPTER_AMD;
|
typedef int HM_ADAPTER_AMD;
|
||||||
|
@ -1904,8 +1904,6 @@ void hc_signal (void c (int));
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef int bool;
|
|
||||||
|
|
||||||
bool class_num (char c);
|
bool class_num (char c);
|
||||||
bool class_lower (char c);
|
bool class_lower (char c);
|
||||||
bool class_upper (char c);
|
bool class_upper (char c);
|
||||||
|
@ -13826,6 +13826,7 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
device_param->d_pws_buf = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_pws, NULL);
|
device_param->d_pws_buf = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_pws, NULL);
|
||||||
device_param->d_pws_amp_buf = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_pws, NULL);
|
device_param->d_pws_amp_buf = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_pws, NULL);
|
||||||
|
device_param->d_rules_c = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_rules_c, NULL); // we need this for weak-hash-check even if the user has choosen for ex: -a 3
|
||||||
device_param->d_tmps = hc_clCreateBuffer (device_param->context, CL_MEM_READ_WRITE, size_tmps, NULL);
|
device_param->d_tmps = hc_clCreateBuffer (device_param->context, CL_MEM_READ_WRITE, size_tmps, NULL);
|
||||||
device_param->d_hooks = hc_clCreateBuffer (device_param->context, CL_MEM_READ_WRITE, size_hooks, NULL);
|
device_param->d_hooks = hc_clCreateBuffer (device_param->context, CL_MEM_READ_WRITE, size_hooks, NULL);
|
||||||
device_param->d_bitmap_s1_a = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, bitmap_size, NULL);
|
device_param->d_bitmap_s1_a = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, bitmap_size, NULL);
|
||||||
@ -13857,6 +13858,7 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
run_kernel_bzero (device_param, device_param->d_pws_buf, size_pws);
|
run_kernel_bzero (device_param, device_param->d_pws_buf, size_pws);
|
||||||
run_kernel_bzero (device_param, device_param->d_pws_amp_buf, size_pws);
|
run_kernel_bzero (device_param, device_param->d_pws_amp_buf, size_pws);
|
||||||
|
run_kernel_bzero (device_param, device_param->d_rules_c, size_rules_c);
|
||||||
run_kernel_bzero (device_param, device_param->d_tmps, size_tmps);
|
run_kernel_bzero (device_param, device_param->d_tmps, size_tmps);
|
||||||
run_kernel_bzero (device_param, device_param->d_hooks, size_hooks);
|
run_kernel_bzero (device_param, device_param->d_hooks, size_hooks);
|
||||||
run_kernel_bzero (device_param, device_param->d_plain_bufs, size_plains);
|
run_kernel_bzero (device_param, device_param->d_plain_bufs, size_plains);
|
||||||
@ -13869,11 +13871,8 @@ int main (int argc, char **argv)
|
|||||||
if (attack_kern == ATTACK_KERN_STRAIGHT)
|
if (attack_kern == ATTACK_KERN_STRAIGHT)
|
||||||
{
|
{
|
||||||
device_param->d_rules = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_rules, NULL);
|
device_param->d_rules = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_rules, NULL);
|
||||||
device_param->d_rules_c = hc_clCreateBuffer (device_param->context, CL_MEM_READ_ONLY, size_rules_c, NULL);
|
|
||||||
|
|
||||||
hc_clEnqueueWriteBuffer (device_param->command_queue, device_param->d_rules, CL_TRUE, 0, size_rules, kernel_rules_buf, 0, NULL, NULL);
|
hc_clEnqueueWriteBuffer (device_param->command_queue, device_param->d_rules, CL_TRUE, 0, size_rules, kernel_rules_buf, 0, NULL, NULL);
|
||||||
|
|
||||||
run_kernel_bzero (device_param, device_param->d_rules_c, size_rules_c);
|
|
||||||
}
|
}
|
||||||
else if (attack_kern == ATTACK_KERN_COMBI)
|
else if (attack_kern == ATTACK_KERN_COMBI)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user