1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-15 12:29:35 +00:00

Add bitness to filename for cached kernels, otherwise a user would load a 32 bit kernel with a 64 bit host binary in case he used the 32 bit binary before which leads to a segfault

This commit is contained in:
Jens Steube 2016-01-15 17:48:27 +01:00
parent 98b1a9370c
commit bc24e3d79b

View File

@ -12570,7 +12570,11 @@ int main (int argc, char **argv)
char *device_name_chksum = (char *) mymalloc (INFOSZ);
snprintf (device_name_chksum, INFOSZ - 1, "%u-%s-%s-%s-%d", device_param->vendor_id, device_param->device_name, device_param->device_version, device_param->driver_version, COMPTIME);
#if __x86_64__
snprintf (device_name_chksum, INFOSZ - 1, "%u-%u-%s-%s-%s-%u", 64, device_param->vendor_id, device_param->device_name, device_param->device_version, device_param->driver_version, COMPTIME);
#else
snprintf (device_name_chksum, INFOSZ - 1, "%u-%u-%s-%s-%s-%u", 32, device_param->vendor_id, device_param->device_name, device_param->device_version, device_param->driver_version, COMPTIME);
#endif
uint device_name_digest[4];