mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-26 01:42:36 +00:00
Fixed division by zero because backend_ctx->hardware_power_all was not re-inserted after refactoring device_param->hardware_power
This commit is contained in:
parent
120326c117
commit
721e1ea54d
@ -4,6 +4,7 @@
|
|||||||
## Bugs
|
## Bugs
|
||||||
##
|
##
|
||||||
|
|
||||||
|
- Fixed division by zero because backend_ctx->hardware_power_all was not re-inserted after refactoring device_param->hardware_power
|
||||||
- Fixed invalid progress counter initialization in attack-mode 9 when using --skip or --restore
|
- Fixed invalid progress counter initialization in attack-mode 9 when using --skip or --restore
|
||||||
- Fixed out-of-boundary reads in attack-mode 9 that were caused by a missing work item limit in the refactored autotune engine
|
- Fixed out-of-boundary reads in attack-mode 9 that were caused by a missing work item limit in the refactored autotune engine
|
||||||
|
|
||||||
|
@ -10725,6 +10725,8 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
|
|||||||
|
|
||||||
u64 size_total_host_all = 0;
|
u64 size_total_host_all = 0;
|
||||||
|
|
||||||
|
u32 hardware_power_all = 0;
|
||||||
|
|
||||||
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -15082,9 +15084,18 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hardware_power_all += hardware_power_max;
|
||||||
|
|
||||||
EVENT_DATA (EVENT_BACKEND_DEVICE_INIT_POST, &backend_devices_idx, sizeof (int));
|
EVENT_DATA (EVENT_BACKEND_DEVICE_INIT_POST, &backend_devices_idx, sizeof (int));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user_options->benchmark == false)
|
||||||
|
{
|
||||||
|
if (hardware_power_all == 0) return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
backend_ctx->hardware_power_all = hardware_power_all;
|
||||||
|
|
||||||
EVENT_DATA (EVENT_BACKEND_SESSION_HOSTMEM, &size_total_host_all, sizeof (u64));
|
EVENT_DATA (EVENT_BACKEND_SESSION_HOSTMEM, &size_total_host_all, sizeof (u64));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -15578,7 +15589,6 @@ void backend_session_reset (hashcat_ctx_t *hashcat_ctx)
|
|||||||
device_param->hardware_power = 0;
|
device_param->hardware_power = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
backend_ctx->hardware_power_all = 0;
|
|
||||||
backend_ctx->kernel_power_all = 0;
|
backend_ctx->kernel_power_all = 0;
|
||||||
backend_ctx->kernel_power_final = 0;
|
backend_ctx->kernel_power_final = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user