mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-14 02:27:31 -07:00
Fix size of pointer instead of size of data
This commit is contained in:
parent
34131739fe
commit
c760e7e5c5
2 changed files with 4 additions and 4 deletions
6
hydra.c
6
hydra.c
|
@ -3512,7 +3512,7 @@ int main(int argc, char *argv[]) {
|
|||
exit(-1);
|
||||
}
|
||||
// if (countinfile > 60) fprintf(stderr, "[WARNING] the -M option is not working correctly at the moment for target lists > 60!\n");
|
||||
hydra_targets = malloc(sizeof(hydra_targets) * (countservers + 2) + 8);
|
||||
hydra_targets = malloc(sizeof(hydra_target*) * (countservers + 2) + 8);
|
||||
if (hydra_targets == NULL)
|
||||
bail("Could not allocate enough memory for target data");
|
||||
sizeinfile = size_of_data;
|
||||
|
@ -3600,7 +3600,7 @@ int main(int argc, char *argv[]) {
|
|||
four_from = (addr4 & l);
|
||||
l = 1 << (32 - k);
|
||||
hydra_brains.targets = countservers = l;
|
||||
hydra_targets = malloc(sizeof(hydra_targets) * (l + 2) + 8);
|
||||
hydra_targets = malloc(sizeof(hydra_target*) * (l + 2) + 8);
|
||||
if (hydra_targets == NULL)
|
||||
bail("Could not allocate enough memory for target data");
|
||||
i = 0;
|
||||
|
@ -3864,7 +3864,7 @@ int main(int argc, char *argv[]) {
|
|||
#endif
|
||||
|
||||
if (hydra_options.restore == 0) {
|
||||
hydra_heads = malloc(sizeof(hydra_heads) * hydra_options.max_use);
|
||||
hydra_heads = malloc(sizeof(hydra_head*) * hydra_options.max_use);
|
||||
target_no = 0;
|
||||
for (i = 0; i < hydra_options.max_use; i++) {
|
||||
hydra_heads[i] = malloc(sizeof(hydra_head));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue