mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-16 17:42:04 +00:00
Fix overflow_check_u64_mul
This commit is contained in:
parent
fafb277e07
commit
db29edf164
@ -183,10 +183,8 @@ bool overflow_check_u64_add (const u64 a, const u64 b)
|
||||
|
||||
bool overflow_check_u64_mul (const u64 a, const u64 b)
|
||||
{
|
||||
const int a_msb = get_msb64 (a);
|
||||
const int b_msb = get_msb64 (b);
|
||||
|
||||
return ((a_msb + b_msb) < 64);
|
||||
u64 c = a * b;
|
||||
return c / a == b;
|
||||
}
|
||||
|
||||
bool is_power_of_2 (const u32 v)
|
||||
|
Loading…
Reference in New Issue
Block a user