Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit acd4be8

Browse files
committed
Update hashes.c
1 parent 119c95b commit acd4be8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hashes.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,8 @@ typedef struct element {
363363
struct element *next; // needed for singly- or doubly-linked lists
364364
} element_t;
365365

366-
static void pe_tolower_str(char* str)
366+
// strlwr - string lowercase
367+
static void pe_transform_to_lowercase_str(char* str)
367368
{
368369
for (char* p = str; *p; ++p)
369370
*p = tolower((unsigned char)*p);
@@ -486,7 +487,7 @@ static void imphash_load_imported_functions(pe_ctx_t *ctx, uint64_t offset, char
486487
}
487488

488489
// Beginning of imphash logic - that's the weirdest thing I've even seen...
489-
pe_tolower_str(dll_name);
490+
pe_transform_to_lowercase_str(dll_name);
490491
char *aux = NULL;
491492

492493
//TODO use a reverse search function instead
@@ -518,7 +519,7 @@ static void imphash_load_imported_functions(pe_ctx_t *ctx, uint64_t offset, char
518519
if (aux)
519520
*aux = '\0';
520521

521-
pe_tolower_str(fname);
522+
pe_transform_to_lowercase_str(fname);
522523

523524
element_t *el = calloc(1, sizeof(element_t));
524525
if (el == NULL) {
@@ -572,7 +573,7 @@ static void imphash_load_imported_functions(pe_ctx_t *ctx, uint64_t offset, char
572573
}
573574
}
574575

575-
pe_tolower_str(el->function_name);
576+
pe_transform_to_lowercase_str(el->function_name);
576577
LL_APPEND(*head, el);
577578
}
578579
}

0 commit comments

Comments
 (0)