summaryrefslogtreecommitdiff
path: root/ext/standard/php_crypt_r.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2008-08-10 21:34:26 +0000
committerPierre Joye <pajoye@php.net>2008-08-10 21:34:26 +0000
commit9b14a298a10987f1ba62d457aa262b1e7a110415 (patch)
tree0fada6eb88e881f7027960b63c9a579fe0a879ae /ext/standard/php_crypt_r.c
parent18547585bf20a8013754a764ea2db802f129162f (diff)
downloadphp-git-9b14a298a10987f1ba62d457aa262b1e7a110415.tar.gz
- MFH: 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index fffd96a048..706a83d3c5 100644
--- a/ext/standard/php_crypt_r.c
+++ b/ext/standard/php_crypt_r.c
@@ -203,8 +203,8 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
}
memcpy(passwd, MD5_MAGIC, MD5_MAGIC_LEN);
-
-#ifdef strncpy_s
+DebugBreak();
+#if _MSC_VER >= 1500
if (strncpy_s(passwd + MD5_MAGIC_LEN, MD5_HASH_MAX_LEN - MD5_MAGIC_LEN, sp, sl + 1) != 0) {
goto _destroyCtx1;
}