Follow us on Twitter or via RSS feeds with tweets or complete announcement texts or excerpts
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Mar 2010 22:18:28 +0100
From: "Magnum, P.I." <rawsmooth@...dband.net>
To: john-users@...ts.openwall.com
Subject: 1.7.5 jumbo-2 minor bugfixes

Two uninitialized variables.

nWordFileLines was only initialized if loading wordlist to memory. It 
must have made some real damage, but I found it just by coincidence 
while experimenting with wordlist distribution.

hund_percent made me scratch my head for a while. That was just 
cosmetical though. It magically showed four decimals of precision after 
reading the integer stored in a .rec file :-)

diff --git a/src/status.c b/src/status.c
index 51d267c..432da41 100644
--- a/src/status.c
+++ b/src/status.c
@@ -277,7 +277,7 @@ static void status_print_cracking(char *percent)
 
 void status_print(void)
 {
-	int percent_value, hund_percent;
+	int percent_value, hund_percent = 0;
 	char s_percent[32];
 
 	percent_value = -1;
diff --git a/src/wordlist.c b/src/wordlist.c
index 433d7af..2e1f4a2 100644
--- a/src/wordlist.c
+++ b/src/wordlist.c
@@ -43,7 +43,7 @@ static struct rpp_context *rule_ctx;
 
 // used for file in 'memory map' mode
 static char *word_file_str, **words;
-static unsigned int nWordFileLines, nCurLine;
+static unsigned int nWordFileLines = 0, nCurLine;
 static struct db_main *_db;
 
 static void save_state(FILE *file)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ