Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-crypt/johntheripper/files: johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
Date: Sun, 08 Apr 2012 05:19:13
Message-Id: 20120408051903.35E732004C@flycatcher.gentoo.org
1 radhermit 12/04/08 05:19:03
2
3 Added: johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
4 Log:
5 Revision bump. Fix typo in jumbo patch and apply performance fix.
6
7 (Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch?rev=1.1&content-type=text/plain
14
15 Index: johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
16 ===================================================================
17 diff --git a/src/NT_fmt_plug.c b/src/NT_fmt_plug.c
18 index eb52e3d..411a45b 100644
19 --- a/src/NT_fmt_plug.c
20 +++ b/src/NT_fmt_plug.c
21 @@ -652,7 +652,7 @@ static inline void set_key_helper(unsigned int * keybuffer,
22 for(; key[md4_size]; i += xBuf, md4_size++)
23 {
24 unsigned int temp;
25 - if ((temp = key[++md4_size]))
26 + if ((temp = key[++md4_size]) && md4_size < PLAINTEXT_LENGTH)
27 {
28 keybuffer[i] = key[md4_size-1] | (temp << 16);
29 }
30 @@ -704,7 +704,7 @@ static inline void set_key_helper_utf8(unsigned int * keybuffer, unsigned int xB
31 const UTF8 * source, unsigned int lenStoreOffset, unsigned int *lastlen)
32 {
33 unsigned int *target = keybuffer;
34 - unsigned int *targetEnd = &keybuffer[xBuf * ((PLAINTEXT_LENGTH + 1) >> 1)];
35 + unsigned int *targetEnd = &keybuffer[xBuf * (PLAINTEXT_LENGTH >> 1)];
36 UTF32 chl, chh = 0x80;
37 unsigned int outlen = 0;
38
39 @@ -844,7 +844,7 @@ static inline void set_key_helper_encoding(unsigned int * keybuffer,
40 i = 0;
41 for(md4_size = 0; key[md4_size]; i += xBuf, md4_size++)
42 {
43 - if ((temp = CP_to_Unicode[key[++md4_size]]))
44 + if ((temp = CP_to_Unicode[key[++md4_size]]) && md4_size < PLAINTEXT_LENGTH)
45 keybuffer[i] = CP_to_Unicode[key[md4_size-1]] | (temp << 16);
46 else {
47 keybuffer[i] = CP_to_Unicode[key[md4_size-1]] | 0x800000;