diff options
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r-- | ext/standard/php_crypt_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index 6f8f6d7a80..bc4fbf3fc4 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -211,7 +211,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { strcat_s(passwd, MD5_HASH_MAX_LEN, "$"); #else /* VC6 version doesn't have strcat_s or strncpy_s */ - if (strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1) != 0) { + if (strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1) < sl) { goto _destroyCtx1; } strcat(passwd, "$"); |