diff -urpN jumbo-unstable3/src/formats.c jumbo-unstable2/src/formats.c --- jumbo-unstable3/src/formats.c 2012-05-28 01:05:39.812500000 +0000 +++ jumbo-unstable2/src/formats.c 2012-05-28 01:03:27.078125000 +0000 @@ -10,6 +10,7 @@ #include "params.h" #include "formats.h" +#include "memory.h" #ifndef BENCH_BUILD #include "options.h" #endif @@ -104,8 +105,21 @@ char *fmt_self_test(struct fmt_main *for salt = format->methods.salt(ciphertext); if (format->methods.get_source != fmt_default_get_source) { sourced = format->methods.get_source(binary, salt, Buf); - if (strcmp(sourced, prepared)) - return "get_source"; + if (stricmp(sourced, ciphertext)) { + void *binary2; + if (format->methods.valid(sourced,format) != 1) return "get_source"; + binary2 = mem_alloc_tiny(format->params.binary_size, MEM_ALIGN_NONE); + memcpy(binary2, binary, format->params.binary_size); + binary = format->methods.binary(sourced); + if (memcmp(binary,binary2,format->params.binary_size)) return "get_source"; + if (format->params.salt_size) { + void *salt2; + salt2 = mem_alloc_tiny(format->params.salt_size, MEM_ALIGN_NONE); + memcpy(salt2, salt, format->params.salt_size); + salt = format->methods.salt(sourced); + if (memcmp(salt,salt2,format->params.salt_size)) return "get_source"; + } + } } if ((unsigned int)format->methods.salt_hash(salt) >= diff -urpN jumbo-unstable3/src/rawMD5_fmt_plug.c jumbo-unstable2/src/rawMD5_fmt_plug.c --- jumbo-unstable3/src/rawMD5_fmt_plug.c 2012-05-28 01:05:58.968750000 +0000 +++ jumbo-unstable2/src/rawMD5_fmt_plug.c 2012-05-28 01:14:28.953125000 +0000 @@ -49,10 +49,10 @@ #define TAG_LENGTH 11 static struct fmt_tests tests[] = { - {FORMAT_TAG "5a105e8b9d40e1329780d62ea2265d8a","test1"}, + {"5a105e8b9d40e1329780d62ea2265d8a","test1"}, {FORMAT_TAG "378e2c4a07968da2eca692320136433d","thatsworking"}, {FORMAT_TAG "8ad8757baa8564dc136c1e07507f4a98","test3"}, - {FORMAT_TAG "d41d8cd98f00b204e9800998ecf8427e", ""}, + {"d41d8cd98f00b204e9800998ecf8427e", ""}, {NULL} }; diff -urpN jumbo-unstable3/src/rawSHA1_fmt_plug.c jumbo-unstable2/src/rawSHA1_fmt_plug.c --- jumbo-unstable3/src/rawSHA1_fmt_plug.c 2012-05-28 01:05:59.093750000 +0000 +++ jumbo-unstable2/src/rawSHA1_fmt_plug.c 2012-05-28 01:14:39.531250000 +0000 @@ -62,13 +62,13 @@ #endif static struct fmt_tests rawsha1_tests[] = { - {FORMAT_TAG "c3e337f070b64a50e9d31ac3f9eda35120e29d6c", "digipalmw221u"}, - {FORMAT_TAG "2fbf0eba37de1d1d633bc1ed943b907f9b360d4c", "azertyuiop1"}, - {FORMAT_TAG "a9993e364706816aba3e25717850c26c9cd0d89d", "abc"}, - {FORMAT_TAG "f879f8090e92232ed07092ebed6dc6170457a21d", "azertyuiop2"}, - {FORMAT_TAG "1813c12f25e64931f3833b26e999e26e81f9ad24", "azertyuiop3"}, - {FORMAT_TAG "095bec1163897ac86e393fa16d6ae2c2fce21602", "7850"}, - {FORMAT_TAG "dd3fbb0ba9e133c4fd84ed31ac2e5bc597d61774", "7858"}, + {"c3e337f070b64a50e9d31ac3f9eda35120e29d6c", "digipalmw221u"}, + {"2fbf0eba37de1d1d633bc1ed943b907f9b360d4c", "azertyuiop1"}, + {FORMAT_TAG "A9993E364706816ABA3E25717850C26C9CD0D89D", "abc"}, + {"f879f8090e92232ed07092ebed6dc6170457a21d", "azertyuiop2"}, + {"1813c12f25e64931f3833b26e999e26e81f9ad24", "azertyuiop3"}, + {"095bec1163897ac86e393fa16d6ae2c2fce21602", "7850"}, + {"dd3fbb0ba9e133c4fd84ed31ac2e5bc597d61774", "7858"}, {NULL} };