From: Jens Steube Date: Fri, 15 Jan 2016 16:48:27 +0000 (+0100) Subject: Add bitness to filename for cached kernels, otherwise a user would load a 32 bit... X-Git-Tag: v3.00-beta~498 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=bc24e3d79be5dfda2c1814aeeb63d175bf00270f;p=hashcat.git 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 --- diff --git a/src/oclHashcat.c b/src/oclHashcat.c index c6ac395..d225ddc 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -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];