cvs: php-src /ext/standard php_crypt_r.c

From: Date: Wed, 20 Aug 2008 13:31:30 +0000
Subject: cvs: php-src /ext/standard php_crypt_r.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-52531@lists.php.net to get a copy of this message
pajoye Wed Aug 20 13:31:30 2008 UTC Modified files: /php-src/ext/standard php_crypt_r.c Log: - MFB: strncpy returns the byte copied not error code or 0 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_crypt_r.c?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/php_crypt_r.c diff -u php-src/ext/standard/php_crypt_r.c:1.3 php-src/ext/standard/php_crypt_r.c:1.4 --- php-src/ext/standard/php_crypt_r.c:1.3 Sun Aug 10 21:34:02 2008 +++ php-src/ext/standard/php_crypt_r.c Wed Aug 20 13:31:30 2008 @@ -1,4 +1,4 @@ -/* $Id: php_crypt_r.c,v 1.3 2008/08/10 21:34:02 pajoye Exp $ */ +/* $Id: php_crypt_r.c,v 1.4 2008/08/20 13:31:30 pajoye Exp $ */ /* +----------------------------------------------------------------------+ | PHP Version 5 | @@ -211,7 +211,7 @@ 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, "$");

« previous php.cvs (#52531) next »