diff options
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r-- | ext/standard/php_crypt_r.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index e8d59b99a..b33fbc706 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -219,17 +219,12 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN); -#if _MSC_VER >= 1500 if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, sp, sl + 1) != 0) { goto _destroyCtx1; } passwd[MD5_MAGIC_LEN + sl] = '\0'; strcat_s(passwd, MD5_HASH_MAX_LEN, "$"); -#else - /* VC6 version doesn't have strcat_s or strncpy_s */ - strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1); - strcat(passwd, "$"); -#endif + dwHashLen = 16; /* Fetch the ctx hash value */ |