From ef004e85f0ca0f3566ae96041cac8f37e13ed1f0 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 16 Feb 2017 10:10:38 +0100 Subject: [PATCH] Fix some variable initializationg warnings in older GCC --- src/interface.c | 6 +++++- src/user_options.c | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/interface.c b/src/interface.c index f49488741..74fe62ea1 100644 --- a/src/interface.c +++ b/src/interface.c @@ -14206,10 +14206,14 @@ void seven_zip_hook_func (hc_device_param_t *device_param, hashes_t *hashes, con // init AES - AES_KEY aes_key = { 0 }; + AES_KEY aes_key; + + memset (&aes_key, 0, sizeof (aes_key)); + AES_set_decrypt_key (ukey, 256, &aes_key); AES_KEY aes_key_copied; + memcpy (&aes_key_copied, &aes_key, sizeof (AES_KEY)); if (padding_check_fast == true) // use part of the data as initialization vector diff --git a/src/user_options.c b/src/user_options.c index 50d828093..ec033e569 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -1565,8 +1565,11 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx) char *outfile = outfile_ctx->filename; - hc_stat_t tmpstat_outfile = { 0 }; - hc_stat_t tmpstat_hashfile = { 0 }; + hc_stat_t tmpstat_outfile; + hc_stat_t tmpstat_hashfile; + + memset (&tmpstat_outfile, 0, sizeof (tmpstat_outfile)); + memset (&tmpstat_hashfile, 0, sizeof (tmpstat_hashfile)); int do_check = 0;