Follow us on Twitter or via RSS feeds with tweets or complete announcement texts or excerpts
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 09 May 2008 10:51:51 -0500
From: jmk <jmk@...fus.net>
To: john-users@...ts.openwall.com
Subject: NetLM / NetNTLM loader.c Patch

Hi,

I've attached a small patch to fix an issue within the NetLM and NetNTLM
loader.c code. If someone can work this into the Jumbo patch the next
time it gets rebuilt, that'd be great. Without it, I'm seeing john
segfault on our 64-bit machine. For some reason, 32-bit works just fine
either way.

Thanks,
Joe


-- 
jmk <jmk@...fus.net>
Foofus Networks

Index: loader.c
===================================================================
--- loader.c	(revision 926)
+++ loader.c	(revision 928)
@@ -259,14 +259,14 @@
 		char *challenge = ldr_get_field(&line);
  
 		if (strncmp(options.format, "netlm", 5)==0) {
-			tmp = (char *) mem_alloc(7 + strlen(challenge) + strlen(netlm) + 1);
-			memset(tmp, 0, 7 + strlen(challenge) + strlen(netlm) + 1);
+			tmp = (char *) mem_alloc(7 + strlen(challenge) + 1 + strlen(netlm) + 1);
+			memset(tmp, 0, 7 + strlen(challenge) + 1 + strlen(netlm) + 1);
 			sprintf(tmp, "$NETLM$%s$%s", challenge, netlm);
 			*ciphertext = tmp;
 		}
 		else {
-			tmp = (char *) mem_alloc(9 + strlen(challenge) + strlen(netntlm) + 1);
-			memset(tmp, 0, 9 + strlen(challenge) + strlen(netntlm) + 1);
+			tmp = (char *) mem_alloc(9 + strlen(challenge) + 1 + strlen(netntlm) + 1);
+			memset(tmp, 0, 9 + strlen(challenge) + 1 + strlen(netntlm) + 1);
 			sprintf(tmp, "$NETNTLM$%s$%s", challenge, netntlm);
 			*ciphertext = tmp;
 		}


-- 
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.

Powered by blists - more mailing lists

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