mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +00:00
[topic/40730] Use strlen() instead of count() in function _equals() of Crypt_RSA.
It appears that count() always returns int(1) on strings. Thus, this check is pointless as is. strlen() was meant here and is actually required to prevent E_NOTICEs from invalid array accesses using $y[$i].
This commit is contained in:
parent
e484373a2b
commit
71dea1fc2b
@ -1791,7 +1791,7 @@ class Crypt_RSA {
|
|||||||
*/
|
*/
|
||||||
function _equals($x, $y)
|
function _equals($x, $y)
|
||||||
{
|
{
|
||||||
if (count($x) != count($y)) {
|
if (strlen($x) != strlen($y)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user