mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-24 23:48:39 +00:00
Fix formats found by cppcheck
This commit is contained in:
parent
4716f9c713
commit
c13ef5aacd
@ -14439,7 +14439,7 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos,
|
|||||||
|
|
||||||
base64_encode (int_to_base64, (const u8 *) digest_buf, 32, (u8 *) tmp_buf);
|
base64_encode (int_to_base64, (const u8 *) digest_buf, 32, (u8 *) tmp_buf);
|
||||||
|
|
||||||
snprintf (out_buf, len-1, "%s:%i:%i:%i:%s:%s",
|
snprintf (out_buf, len-1, "%s:%u:%u:%u:%s:%s",
|
||||||
SIGNATURE_SCRYPT,
|
SIGNATURE_SCRYPT,
|
||||||
N,
|
N,
|
||||||
r,
|
r,
|
||||||
@ -15477,7 +15477,7 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos,
|
|||||||
if (version == 1)
|
if (version == 1)
|
||||||
final_random_seed_len = 4;
|
final_random_seed_len = 4;
|
||||||
|
|
||||||
snprintf (out_buf, len-1, "%s*%d*%d*%d",
|
snprintf (out_buf, len-1, "%s*%u*%u*%u",
|
||||||
SIGNATURE_KEEPASS,
|
SIGNATURE_KEEPASS,
|
||||||
version,
|
version,
|
||||||
rounds,
|
rounds,
|
||||||
@ -15528,9 +15528,9 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos,
|
|||||||
|
|
||||||
char ptr_contents_len[10] = { 0 };
|
char ptr_contents_len[10] = { 0 };
|
||||||
|
|
||||||
sprintf ((char*) ptr_contents_len, "%d", contents_len);
|
sprintf ((char*) ptr_contents_len, "%u", contents_len);
|
||||||
|
|
||||||
sprintf (ptr_data, "%d", contents_len);
|
sprintf (ptr_data, "%u", contents_len);
|
||||||
|
|
||||||
ptr_data += strlen(ptr_contents_len);
|
ptr_data += strlen(ptr_contents_len);
|
||||||
|
|
||||||
@ -15566,7 +15566,7 @@ int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos,
|
|||||||
*ptr_data = '*';
|
*ptr_data = '*';
|
||||||
ptr_data++;
|
ptr_data++;
|
||||||
|
|
||||||
sprintf (ptr_data, "%d", keyfile_len);
|
sprintf (ptr_data, "%u", keyfile_len);
|
||||||
|
|
||||||
ptr_data += 2;
|
ptr_data += 2;
|
||||||
|
|
||||||
|
@ -160,12 +160,12 @@ static void generate_cached_kernel_mp_filename (const u32 opti_type, const u32 o
|
|||||||
|
|
||||||
static void generate_source_kernel_amp_filename (const u32 attack_kern, char *shared_dir, char *source_file)
|
static void generate_source_kernel_amp_filename (const u32 attack_kern, char *shared_dir, char *source_file)
|
||||||
{
|
{
|
||||||
snprintf (source_file, 255, "%s/OpenCL/amp_a%d.cl", shared_dir, attack_kern);
|
snprintf (source_file, 255, "%s/OpenCL/amp_a%u.cl", shared_dir, attack_kern);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void generate_cached_kernel_amp_filename (const u32 attack_kern, char *profile_dir, const char *device_name_chksum, char *cached_file)
|
static void generate_cached_kernel_amp_filename (const u32 attack_kern, char *profile_dir, const char *device_name_chksum, char *cached_file)
|
||||||
{
|
{
|
||||||
snprintf (cached_file, 255, "%s/kernels/amp_a%d.%s.kernel", profile_dir, attack_kern, device_name_chksum);
|
snprintf (cached_file, 255, "%s/kernels/amp_a%u.%s.kernel", profile_dir, attack_kern, device_name_chksum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_opencl_platforms_filter (hashcat_ctx_t *hashcat_ctx, const char *opencl_platforms, u32 *out)
|
static int setup_opencl_platforms_filter (hashcat_ctx_t *hashcat_ctx, const char *opencl_platforms, u32 *out)
|
||||||
|
Loading…
Reference in New Issue
Block a user