Skip to content

Commit

Permalink
Fixed minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Retr0-code committed Oct 29, 2023
1 parent 2b8a293 commit 4f84018
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hive.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ reg_path_t* reg_make_path(uint32_t depth, ...)
}

// Allocation of registry path struct
reg_path_t* reg_path_ptr = malloc_check(reg_path_ptr, sizeof(reg_path_t), hv_alloc_error);
reg_path_t* reg_path_ptr = malloc_check(reg_path_ptr, sizeof(reg_path_t), NULL);

// Setting given values
reg_path_ptr->size = depth;
Expand Down
4 changes: 2 additions & 2 deletions src/hive.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ void* reg_get_value(const value_key_t* vk_ptr, FILE* hive_ptr);
wchar_t* reg_get_class(named_key_t* nk_ptr, FILE* hive_ptr);

// Sets file cursor from beggining to 0x1000 + root_offset
inline int hive_file_seek(FILE* hive_ptr, const uint32_t root_offset);
int hive_file_seek(FILE* hive_ptr, const uint32_t root_offset);

// Reads structure from given give
inline size_t hive_read_struct(FILE* hive_ptr, void* hive_struct, size_t read_size);
size_t hive_read_struct(FILE* hive_ptr, void* hive_struct, size_t read_size);

// Reads root named key and header of a hive
int hive_get_root(FILE* hive_ptr, hive_header_t* hive_header_ptr, named_key_t* root_key_ptr);
Expand Down

0 comments on commit 4f84018

Please sign in to comment.