Skip to content
Browse files

fixed bug #13642 to validate bitmask

git-svn-id: http://svn.php.net/repository/pear/packages/Net_IPv4/trunk@259757 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent efae6aa commit 0284037443d65c878494300fa53efef54148aa3a @bate bate committed May 14, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPv4.php
View
2 IPv4.php
@@ -229,7 +229,7 @@ function parseAddress($address)
/*
* a CIDR bitmask type was entered
*/
- } else if ($parts[1] >= 0 && $parts[1] <= 32) {
+ } else if (ctype_digit($parts[1]) && $parts[1] >= 0 && $parts[1] <= 32) {
// bitmask was entered
$myself->bitmask = $parts[1];

0 comments on commit 0284037

Please sign in to comment.
Something went wrong with that request. Please try again.