summaryrefslogtreecommitdiff
path: root/ext/standard/php_crypt_r.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-08-10 21:34:02 +0000
committerPierre Joye <pajoye@php.net>2008-08-10 21:34:02 +0000
commit4a015008b67a7155c5d3f0a13c8d68c9035e1472 (patch)
tree0f1af87a67688db3a1d6236147949766a6e3470b /ext/standard/php_crypt_r.c
parenta270199067a5dbba1a98248cb0e56bdd5428d967 (diff)
downloadphp-git-4a015008b67a7155c5d3f0a13c8d68c9035e1472.tar.gz
- fix the VC6 fix or strncpy_s (md5 crypt failed with VC9 as it used strncpy wrongly)
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r--ext/standard/php_crypt_r.c2
1 files changed, 1 insertions, 1 deletions
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;
}