From 4a015008b67a7155c5d3f0a13c8d68c9035e1472 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 10 Aug 2008 21:34:02 +0000 Subject: [PATCH] - fix the VC6 fix or strncpy_s (md5 crypt failed with VC9 as it used strncpy wrongly) --- ext/standard/php_crypt_r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index 7f8676a54b..99042b01a9 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -204,7 +204,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN); -#ifdef strncpy_s +#if _MSC_VER >= 1500 if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, sp, sl + 1) != 0) { goto _destroyCtx1; } -- 2.50.1