Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Enforce int type on getBytes length
Browse files Browse the repository at this point in the history
  • Loading branch information
superdweebie committed Aug 18, 2013
1 parent c21cd36 commit 0901e78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/Zend/Math/Rand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ abstract class Rand
*/
public static function getBytes($length, $strong = false)
{
$length = (int) $length;

if ($length <= 0) {
return false;
}
Expand Down

0 comments on commit 0901e78

Please sign in to comment.