mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-30 02:18:33 +00:00
Merge pull request #4098 from matrix/fix_bitmap-max
User Options: limit --bitmap-max value to 31
This commit is contained in:
commit
91d828fbd2
@ -169,6 +169,7 @@
|
||||
- Metal Backend: improved compute workloads calculation
|
||||
- Modules: Check UnpackSize to raise false positive with hc_decompress_rar
|
||||
- User Options: added --metal-compiler-runtime option
|
||||
- User Options: limit --bitmap-max value to 31
|
||||
- User Options: assigned -H to --hash-info
|
||||
- Hash-Info: show more details using -HH
|
||||
- Hardware Monitor: avoid sprintf in src/ext_iokit.c
|
||||
|
@ -110,6 +110,8 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
u32 *bitmap_s2_c = (u32 *) hcmalloc ((1U << bitmap_max) * sizeof (u32));
|
||||
u32 *bitmap_s2_d = (u32 *) hcmalloc ((1U << bitmap_max) * sizeof (u32));
|
||||
|
||||
if (!bitmap_s1_a || !bitmap_s1_b || !bitmap_s1_c || !bitmap_s1_d || !bitmap_s2_a || !bitmap_s2_b || !bitmap_s2_c || !bitmap_s2_d) return -1;
|
||||
|
||||
u32 bitmap_bits;
|
||||
u32 bitmap_nums;
|
||||
u32 bitmap_mask;
|
||||
|
@ -996,6 +996,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->bitmap_max > 31)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid --bitmap-max value specified - must be lower than 32.");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->rp_gen_func_min > user_options->rp_gen_func_max)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid --rp-gen-func-min value specified.");
|
||||
|
Loading…
Reference in New Issue
Block a user