summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2012-04-08 05:19:03 +0000
committerTim Harder <radhermit@gentoo.org>2012-04-08 05:19:03 +0000
commit1c4ffe37b4a63756d65bb190919caf4f750549be (patch)
treee9a887e71f5ef50d5684d945fc6f926583ea0e35 /app-crypt/johntheripper/files
parentversion bump (diff)
downloadhistorical-1c4ffe37b4a63756d65bb190919caf4f750549be.tar.gz
historical-1c4ffe37b4a63756d65bb190919caf4f750549be.tar.bz2
historical-1c4ffe37b4a63756d65bb190919caf4f750549be.zip
Revision bump. Fix typo in jumbo patch and apply performance fix.
Package-Manager: portage-2.2.0_alpha100/cvs/Linux x86_64
Diffstat (limited to 'app-crypt/johntheripper/files')
-rw-r--r--app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch b/app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
new file mode 100644
index 000000000000..6066cb8f314e
--- /dev/null
+++ b/app-crypt/johntheripper/files/johntheripper-1.7.9-jumbo-5-NT-performance-02.patch
@@ -0,0 +1,31 @@
+diff --git a/src/NT_fmt_plug.c b/src/NT_fmt_plug.c
+index eb52e3d..411a45b 100644
+--- a/src/NT_fmt_plug.c
++++ b/src/NT_fmt_plug.c
+@@ -652,7 +652,7 @@ static inline void set_key_helper(unsigned int * keybuffer,
+ for(; key[md4_size]; i += xBuf, md4_size++)
+ {
+ unsigned int temp;
+- if ((temp = key[++md4_size]))
++ if ((temp = key[++md4_size]) && md4_size < PLAINTEXT_LENGTH)
+ {
+ keybuffer[i] = key[md4_size-1] | (temp << 16);
+ }
+@@ -704,7 +704,7 @@ static inline void set_key_helper_utf8(unsigned int * keybuffer, unsigned int xB
+ const UTF8 * source, unsigned int lenStoreOffset, unsigned int *lastlen)
+ {
+ unsigned int *target = keybuffer;
+- unsigned int *targetEnd = &keybuffer[xBuf * ((PLAINTEXT_LENGTH + 1) >> 1)];
++ unsigned int *targetEnd = &keybuffer[xBuf * (PLAINTEXT_LENGTH >> 1)];
+ UTF32 chl, chh = 0x80;
+ unsigned int outlen = 0;
+
+@@ -844,7 +844,7 @@ static inline void set_key_helper_encoding(unsigned int * keybuffer,
+ i = 0;
+ for(md4_size = 0; key[md4_size]; i += xBuf, md4_size++)
+ {
+- if ((temp = CP_to_Unicode[key[++md4_size]]))
++ if ((temp = CP_to_Unicode[key[++md4_size]]) && md4_size < PLAINTEXT_LENGTH)
+ keybuffer[i] = CP_to_Unicode[key[md4_size-1]] | (temp << 16);
+ else {
+ keybuffer[i] = CP_to_Unicode[key[md4_size-1]] | 0x800000;