@@ -107,7 +107,7 @@ int dump_users_keys(FILE* sam_hive, named_key_t** users_keys_array, size_t* user
107107 -9 , 5 ,
108108 hive_header_ptr , base_nk_ptr , users_nk_ptr , reg_users_path , hints
109109 );
110- memset (* users_keys_array , NULL , subkey_list .elements_amount * sizeof (named_key_t ));
110+ memset (* users_keys_array , 0 , subkey_list .elements_amount * sizeof (named_key_t ));
111111 * users_amount = 0 ;
112112
113113 // Iterate throug all Users subkeys
@@ -303,7 +303,13 @@ int decrypt_ntlm_hash(ntlm_user_t* user_info_ptr, const uint8_t* hashed_bootkey,
303303 return 0 ;
304304}
305305
306- int decrypt_hash (uint8_t * enc_hash , uint8_t * hashed_bootkey , uint8_t * ntlmphrase , ntlm_user_t * user_info_ptr , uint8_t * decrypted_hash )
306+ int decrypt_hash (
307+ const uint8_t * enc_hash ,
308+ const uint8_t * hashed_bootkey ,
309+ const uint8_t * ntlmphrase ,
310+ ntlm_user_t * user_info_ptr ,
311+ uint8_t * decrypted_hash
312+ )
307313{
308314 // Validating parameters
309315 if (enc_hash == NULL || hashed_bootkey == NULL || ntlmphrase == NULL || user_info_ptr == NULL || decrypted_hash == NULL )
@@ -355,7 +361,13 @@ int decrypt_hash(uint8_t* enc_hash, uint8_t* hashed_bootkey, uint8_t* ntlmphrase
355361 return 0 ;
356362}
357363
358- int decrypt_salted_hash (uint8_t * enc_hash , uint8_t * hashed_bootkey , uint8_t * salt , ntlm_user_t * user_info_ptr , uint8_t * decrypted_hash )
364+ int decrypt_salted_hash (
365+ const uint8_t * enc_hash ,
366+ const uint8_t * hashed_bootkey ,
367+ const uint8_t * salt ,
368+ ntlm_user_t * user_info_ptr ,
369+ uint8_t * decrypted_hash
370+ )
359371{
360372 // Validating parameters
361373 if (enc_hash == NULL || hashed_bootkey == NULL || salt == NULL || user_info_ptr == NULL || decrypted_hash == NULL )
0 commit comments