diff -urpN memdbg1/src/dynamic_fmt.c memdbg/src/dynamic_fmt.c --- memdbg1/src/dynamic_fmt.c 2013-04-10 13:59:34.498180600 -0500 +++ memdbg/src/dynamic_fmt.c 2013-04-08 16:10:53.000000000 -0500 @@ -9679,6 +9679,18 @@ static char *FixupIfNeeded(char *ciphert if (m_allow_rawhash_fixup && strncmp(ciphertext, "$dynamic_", 9)) { static char __ciphertext[512+24]; + if (pPriv->pSetup->flags & MGF_SALTED) { + if (!strchr(ciphertext, '$')) + return ciphertext; + } + if (pPriv->pSetup->flags & MGF_SALTED2) { + if (!strstr(ciphertext, "$$2")) + return ciphertext; + } + if (pPriv->pSetup->flags & MGF_HDAA_SALT) { + if (!strstr(ciphertext, "$$F2")||!strstr(ciphertext, "$$F3")) + return ciphertext; + } strcpy(__ciphertext, pPriv->dynamic_WHICH_TYPE_SIG); strnzcpy(&__ciphertext[strlen(__ciphertext)], ciphertext, 512); return __ciphertext;