diff options
author | Pierre Joye <pajoye@php.net> | 2009-11-02 20:46:52 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-11-02 20:46:52 +0000 |
commit | 826ca288e752d12f893d198d48a3c50aa873f18b (patch) | |
tree | 555ea3b7cb61fae33f753122c3dcc5af53ab60cd /ext/standard/php_crypt_r.c | |
parent | 574b0882a12f33f00e04cc1c43c410863d60e9c6 (diff) | |
download | php-git-826ca288e752d12f893d198d48a3c50aa873f18b.tar.gz |
- Fixed #50052, Different Hashes on Windows and Linux on wrong Salt size
Diffstat (limited to 'ext/standard/php_crypt_r.c')
-rw-r--r-- | ext/standard/php_crypt_r.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index e0465fdb59..4307f4c903 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -208,6 +208,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { 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 */ |